悉野小楼

导航

2012年6月11日

Sql 更新一列为行号

摘要: update employeeset emp_id=t1.rowIdfrom( --select * from --( select Emp_UserName,ROW_NUMBER() over(Order by emp_username) as rowId from employee ) as t1 where t1.Emp_UserName=employee.Emp_UserName--) as thttp://social.msdn.microsoft.com/Forums/zh-CN/sqlserverzhchs/thread/6160088e-524f-412c-93be-e76.. 阅读全文

posted @ 2012-06-11 22:06 悉野 阅读(3163) 评论(0) 推荐(0) 编辑

Sql 删除表格的列

摘要: alter table mytable drop column mycol1, mycol2 阅读全文

posted @ 2012-06-11 11:06 悉野 阅读(254) 评论(0) 推荐(0) 编辑

T-Sql 查询表的列

摘要: select name from syscolumns where id = object_id(N'mytable') 阅读全文

posted @ 2012-06-11 11:05 悉野 阅读(139) 评论(0) 推荐(0) 编辑