create table user_t
(
    userID int identity(1,1) not null,
    userName varchar(20),
    userPassword varchar(20),
    createData  datetime  NULL ,
    DeptCode  int not null,
    ISVALID char(1) not null constraint DF_Isvalid DEFAULT('1'),--default为默认约束
    CONSTRAINT PK_userid primary key CLUSTERED(userID,userName) --单列主键、复合主键 
    CONSTRAINT FK_DeptCode FOREIGN KEY(DeptCode)
)