查找临时表的列名 [英] Find the column names of Temp table
本文介绍了查找临时表的列名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要找到临时表的列名.
如果它是一个物理表,那么我们可以使用 sys.columns
或 Information_schema.columns
系统视图来查找列名.
If it is a physical table then we can either use sys.columns
or Information_schema.columns
system views to find the column names.
类似地,有没有办法找到临时表中存在的列名?
Similarly is there a way to find the column names present in temp table?
推荐答案
SELECT *
FROM tempdb.sys.columns
WHERE object_id = Object_id('tempdb..#sometemptable');
这篇关于查找临时表的列名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文