Add Unique constaint to table creation
17>
18> -- Add Unique constaint to table creation
19> CREATE TABLE projects (project_no CHAR(4) DEFAULT 'p1',
20> project_name CHAR(15) NOT NULL,
21> budget FLOAT NULL
22> CONSTRAINT unique_no UNIQUE (project_no))
23> GO
1>
2> drop table projects
3> GO
1>
Related examples in the same category