How to auto-complete all columns in "select * from table" in SQL Server Management Studio
Found this myself.
- Type
Select * From TableA
in SSMS. - Exactly Select text
Select * From TableA
. - Use
Ctrl+Shift+Q
to pop up Query Designer window. - Click OK. "*" is replaced by "c1, c2, c3..."
Query Designer auto-populates all the columns. just open it & close. if you want only portion of columns, I found it is still easier to delete them on text editor than trying to use mouse to uncheck them on GUI.
Still hope to find a way to eliminate the Keyboard/mouse switch on step 4? seems there is no short-cut key for the OK button.
Update 2019-06-24
Above method does not work for table in SQL Azure. ApexSQL SQL formatter seems working well for me, it's free.
Update 2020-10-30
found a similar function in LINQPad, it allows me to auto-complete all properties in LINQ, See here
In SQL Server Management Studio if you expand the object explorer and then the node for the particular table in question then you can drag the columns node into the query window and this will type out all of the column names for you.
There are probably better ways to do this, but that's what I use.