Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
SELECT * FROM INFORMATION_SCHEMA.COLUMNS
显示除临时表之外的所有表的列。如何获取临时表列,然后按表名聚合并计算它们?
CREATE TABLE #T ( X INT, Y INT ) SELECT * FROM tempdb.sys.columns WHERE object_id = object_id('tempdb..#T')