Is there a way to expand the column list in a SELECT * from #Temp

As seen here LINK you can hover over the * in a SELECT * from... and a tooltip will come up with a list of the columns represented by that * .

Is there a way to copy the text from the tooltip to the clipboard?

I know that you can use the columns folder in the object explorer to generate a list of columns by dragging it into the query editor window, but this cannot work for temp tables as they do not appear in the object explorer.

EDIT

For completeness sake, the answer below "You can right-click on the table in Object Explorer and select Script Table as->CREATE to->New Query Editor Window." is also not workable for the same reason as above.

END EDIT

I do not see a way to do this in SSMSBoost, which is an add-on for SSMS that I use. (The only reason I mention it is I am pretty sure I have seen the SSMSBoost developers on SO, feature request??)

EDIT 2: Is there any other way to quickly expand the * in a SELECT * from #Temp_Table without actually running the code to create the temp table? END EDIT 2


您可以将列的子文件夹从对象浏览器拖到编辑器中,列将作为列表添加。


Very similar to this question. Here is the accepted answer from that question:

select * from tempdb.sys.columns where object_id =
object_id('tempdb..#mytemptable');

You can right-click on the table in Object Explorer and select Script Table as -> CREATE to -> New Query Editor Window .

The information you want in near the top of the script this command creates.

链接地址: http://www.djcxy.com/p/76770.html

上一篇: 下载失败时,从Download Manager android继续下载

下一篇: 有没有办法从#Temp的SELECT *中扩展列列表