SQL exclude a column using SELECT * [except columnA] FROM tableA?

后端 未结 30 2600
花落未央
花落未央 2020-11-21 23:15

We all know that to select all columns from a table, we can use

SELECT * FROM tableA

Is there a way to exclude column(s) from a table witho

30条回答
  •  自闭症患者
    2020-11-21 23:55

    Basically, you cannot do what you would like - but you can get the right tools to help you out making things a bit easier.

    If you look at Red-Gate's SQL Prompt, you can type "SELECT * FROM MyTable", and then move the cursor back after the "*", and hit to expand the list of fields, and remove those few fields you don't need.

    It's not a perfect solution - but a darn good one! :-) Too bad MS SQL Server Management Studio's Intellisense still isn't intelligent enough to offer this feature.......

    Marc

提交回复
热议问题