得到临时表的列数

SELECT * FROM tempdb..syscolumns
WHERE (id = OBJECT_ID('tempdb..#temp'))

 

得到正常表列数

 

SELECT * FROM syscolumns
WHERE (id = OBJECT_ID('tablename'))

posted @ 2008-08-29 00:01  alex hu  阅读(173)  评论(0编辑  收藏  举报