SELECT * FROM tempdb..syscolumns
WHERE (id = OBJECT_ID('tempdb..#temp'))
得到正常表列数
SELECT * FROM syscolumns
WHERE (id = OBJECT_ID('tablename'))
SELECT * FROM tempdb..syscolumns
WHERE (id = OBJECT_ID('tempdb..#temp'))
得到正常表列数
SELECT * FROM syscolumns
WHERE (id = OBJECT_ID('tablename'))
转载于:https://www.cnblogs.com/hubj/archive/2008/08/29/1279075.html