admin管理员组文章数量:1435859
Can someone tell me if I can do the following in SQL Server Management Studio v20.2? In another SQL application, I could type select a.* from <table> a
and when I went back and deleted the *
, I would see a list of the column names in table a
AND be able to select multiple columns at once. In SSMS it only lets me select one column at a time. Then I need to type the , a.
again.
I tried to capture a screen shot of it but the column list closes when it freezes the screen. I've looked through the Intellisense posts on Stack Overflow but none seem appropriate. I don't know what else it might be called.
Can someone tell me if I can do the following in SQL Server Management Studio v20.2? In another SQL application, I could type select a.* from <table> a
and when I went back and deleted the *
, I would see a list of the column names in table a
AND be able to select multiple columns at once. In SSMS it only lets me select one column at a time. Then I need to type the , a.
again.
I tried to capture a screen shot of it but the column list closes when it freezes the screen. I've looked through the Intellisense posts on Stack Overflow but none seem appropriate. I don't know what else it might be called.
Share Improve this question asked Nov 15, 2024 at 21:11 Sara M-SSara M-S 1 4 |1 Answer
Reset to default 0I think most people use tab completion on the keyboard for this, and never switch to their mouse. So the process is type , a.
, plus the first (usually) one to three letters of the column, and then use tab to finish typing the rest of the column name. Occasionally you may need more characters or a down arrow or two, if column names are repetitive.
If your query uses a lot of columns, this is still slower than clicking columns from the same open list, as you describe. But up to four or five columns it can be just as faster or faster for a good typist, since you skip moving back to the mouse at all; your hands never leave the keyboard. It's also MUCH faster (and easier on the wrists) than the alternative of typing , a.
and then switching back to the mouse for each item, which seems to be what you describe doing right now.
The other option is right-clicking the table name in the Object Explorer and choosing to "Script Table as..." => "Select To..." => "New Query Editor Window". This will give you list of all the columns. It's in a new window, but copy and paste works, and it's easy to do a ctrl+h to replace the leading [
with a.[
, so it matches your table alias. If you really have 10s of columns, this can be effective.
版权声明:本文标题:sql server - SSMS v20.2 Intellisense Selecting multiple columns from list generated by select * - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745671527a2669597.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
*
but then doesn't have any nice way of getting it to expand that list – Martin Smith Commented Nov 15, 2024 at 21:48