摘要:1 --添加新列 2 ALTER TABLE TABLENAME ADD ID int 3 --赋值 4 UPDATE TABLENAME SET ID = IDENTITY_ID 5 --删除标识列 6 ALTER TABLE TABLENAME DROP COLUMN IDENTITY_ID一般...
阅读全文
摘要:updatewset w.TagCount=x.TagCountfrom (select ItemID,COUNT(*) as TagCount from r where IsValid=1 group by ItemID) as xwhere ID =4 and IsValid=1 and w.I...
阅读全文