摘要:
描述:当字段Column1不为空时,增加条件conditionselect *from tablewhere (OtherCondition) and (Column1 is NULL or (Column1 is not NULL and condition))如果没有其它条件(OhterCo... 阅读全文
摘要:
功能:判断表中是否存在某字段,若不存在,则新增该字段语句:IF NOT EXIST (SELECT 1 FROM [DATABASE].[SCHEMA].SYSCOLUMNS WHERE ID=OBJECT_ID([DATABASE].[SCHEMA].[TABLENAME]) AND NAME='... 阅读全文