ODBC Server Reference Manual
CORE SQL Language
HP NonStop ODBC Server Reference Manual—429151-002
3-41
Examples
PRIMARY KEY can appear not more than once in a CREATE TABLE
statement.
No other table constraints are supported.
Examples
The following statement creates a table called EMPLOYEE:
create table employee
(empnum smallint,
first_name char(15),
last_name char(20),
deptnum smallint default null,
jobcode smallint default null,
salary float default null)
The following statement creates a table called DEPT:
create table dept
(deptnum smallint not null,
deptname char(12),
manager smallint,
rptdept smallint default null,
location char (18) default null,
primary key (deptnum))
The table is created on the PERSNL subvolume and is recorded in the NonStop
SQL/MP catalog on that subvolume.
File Attributes and Security Considerations
The following NonStop SQL/MP file attributes and security considerations apply to the
use of CREATE TABLE:
•
The default physical file attributes for the table are the same as in NonStop
SQL/MP.
•
The default table organization is the same as in NonStop SQL/MP: KEY
SEQUENCED.
•
The table definition must comply with NonStop SQL/MP limits. See the NonStop
SQL/MP Reference Manual for the limits.
•
The ownership and security of the table affect dependent indexes and views.
These dependencies are discussed in the CREATE VIEW, CREATE INDEX, and
ALTER security statements.
For further information about these NonStop SQL/MP features, see the CREATE
TABLE statement description in the NonStop SQL/MP Reference Manual.