随笔一些sql常用知识点
1
--判断临时表是否存在
2
if object_id('tempdb..#temp_kiban') is not null
3
drop table #temp_kiban
--判断临时表是否存在2
if object_id('tempdb..#temp_kiban') is not null 3
drop table #temp_kiban1 --列出表的所有字段名
2 select * from DB名.dbo.syscolumns where id = object_id('表名')
2 select * from DB名.dbo.syscolumns where id = object_id('表名')
浙公网安备 33010602011771号