Mega Code Archive

 
Categories / MSSQL / Constraints
 

Specification of the primary key of the employee table as a column-level constraint

1> -- Specification of the primary key of the employee table as a column-level constraint. 2> CREATE TABLE employee 3>             (emp_no    INTEGER NOT NULL CONSTRAINT prim_empl PRIMARY KEY, 4>              emp_fname CHAR(20) NOT NULL, 5>              emp_lname CHAR(20) NOT NULL, 6>              dept_no   CHAR(4) NULL) 7> GO 1> drop table employee 2> GO 1>