ODBC Server Reference Manual

Transact-SQL Language
HP NonStop ODBC Server Reference Manual429151-002
4-55
Examples
column-name
identifies a column in the table. The column-name must be unique for columns
defined in the table.
data-type
specifies the SQL Server data type for the column. Data types are converted to
NonStop SQL/MP data types. Data types are described under Language Elements
on page 4-5.
If you specify an unsupported data type, an error message is generated and the
statement is not executed.
NOT NULL, NULL
specifies whether the column can contain null values.
NOT NULL is the default.
Examples
The following statement creates a table called EMPLOYEE in the NonStop SQL/MP
catalog called PERSNL:
use test_disk01_persnl
create table employee
(empnum smallint,
first_name char(15),
last_name char(20),
deptnum smallint null,
jobcode smallint null,
salary float null)
The EMPLOYEE table definition is recorded in the PERSNL NonStop SQL/MP catalog
on the disk volume DISK01 on the node called TEST.
The following statement creates a table called DEPT:
create table dept
(deptnum smallint,
deptname char(12),
manager smallint,
rptdept smallint null,
location char (18) null)
The table is created on the PERSNL subvolume and is recorded in the NonStop
SQL/MP catalog on that subvolume.