Provides table-level definitions to specify when a table is created.
| Valid in: | DATA and PROC steps (when accessing DBMS data using SAS/ACCESS software) |
|---|---|
| Category: | Data Set Control |
| Default: | none |
| Requirement: | You must specify constraints within the CREATE TABLE statement parentheses. |
| Data source: | Teradata |
| See: | DBCREATE_TABLE_OPTS= data set option |
Table of Contents
indicates one or more clauses that are specific to Teradata that must be specified when creating a table but that must appear inside the CREATE TABLE parentheses.
Use this option to add table-level definitions in the CREATE TABLE statement. DBCREATE_TABLE_OPTS= is similar to this option except that it lets you add DBMS-specific text outside (to the right) of the parentheses.
In this example, DBCONSTRAINT= specifies a table-level constraint that columns x and y are primary key columns.
libname x teradata user=myusr1 pw=mypwd1;
/*
* Submits this SQL with table-level constraints.
*
* CREATE MULTISET TABLE "test"
* ("x" FLOAT NOT NULL ,
* "y" FLOAT NOT NULL ,
* CONSTRAINT test PRIMARY KEY(X,Y)
* );
*/
data x.test(DBCONSTRAINT='CONSTRAINT test PRIMARY KEY(X,Y)' DBNULL=(_ALL_=NO));
x=1;y=1;
run;