Drag Column Names from SSMS Object Explorer to Query Editor Window

There is a way to get a list of all the table columns in the Query Editor window by dragging column names from Object Explorer in SQL Server Management Studio.

In Object Explorer: Click 'Columns', hold and drag it on to the Query Editor window:

drag_column_names_all_1

Comma separated list of all the table columns will show up:

drag_column_names_all_2

You can drag column names one by one from Object Explorer by holding and dragging them on to the Query Editor window:

drag_column_names_one

You can also drag other object names like table names, view names, function names, stored procedure names, database names etc. from Object Explorer window:

drag_table_names

If the post helped you, please share it:
Pin It

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">