关于动态建表的一个问题
Set @CreateSQL='Create Table '+ @TableName +
'( [OpeningDirection] NCHAR (1) NOT NULL,
CONSTRAINT [CK_'+@TableName+'_OpeningDirection] CHECK ([OpeningDirection]='+'多'+' OR OpeningDirection='+'空'+'))'
Exec(@CreateSQL)
Set @CreateSQL='Create Table '+ @TableName +
'( [OpeningDirection] NCHAR (1) NOT NULL,
CONSTRAINT [CK_'+@TableName+'_OpeningDirection] CHECK ([OpeningDirection]='+'''多'''+' OR OpeningDirection='+'''空'''+'))'
Exec(@CreateSQL)