Use SQL statements to create and delete Constraints
Primary constraints: (primary key constraint); unique constraints: (unique constraint); check constraints: (check constraint); default constraints: (default constraint); external constraints: (foreign key constraint ); **************************************** * ***************************** add constraints: alter table tablenameadd constraint pk_colname primary key (colname) primary constraint alter table tablenameadd constraint uq_colname unique (colname) unique constraint alter table tablenameadd constraint df_colname default ('address unknown ') for colname default constraint alter table tablenameadd constraint ck_colname check (colname between 12 and 15) Check constraint alter table tablenameadd constraint fk_colname foreign key (colname) References tablename (colname) external constraint delete: alter table tablenameddrop constraint name create login account/database user create login account: exec sp_grantlogin 'windows domain name/domain account' Create Database User: exec sp_grantdbaccess' login account ', 'database user' authorization to database: grant permission [on table name] to database user the above statements can be directly operated on Enterprise Manager/security/login/New login in Enterprise Manager
Enter the name and password
Select database access, and then check "db_owner allowed in" database role"