MS SQL T-SQL 创建表时同时增加两个约束语法
IF OBJECT_ID('TEST') IS NOT NULL DROP TABLE TEST GO CREATE TABLE TEST( ID INT NOT NULL CONSTRAINT PK_TEST_ID PRIMARY KEY(ID),CONSTRAINT FK_TEST_ID FOREIGN KEY(ID) REFERENCES member_login_tb(ID))
IF OBJECT_ID('TEST') IS NOT NULL DROP TABLE TEST GO CREATE TABLE TEST( ID INT NOT NULL CONSTRAINT PK_TEST_ID PRIMARY KEY(ID),CONSTRAINT FK_TEST_ID FOREIGN KEY(ID) REFERENCES member_login_tb(ID))