随笔一些sql常用知识点

1--判断临时表是否存在
2if object_id('tempdb..#temp_kiban'is not null 
3drop table #temp_kiban
1 --列出表的所有字段名
2 select * from DB名.dbo.syscolumns where id = object_id('表名'

 

posted on 2009-11-21 10:14  奥尔格勒  阅读(220)  评论(0编辑  收藏  举报