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

后端 未结 30 2520
花落未央
花落未央 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:53

    Like the others have said there is no way to do this, but if you're using Sql Server a trick that I use is to change the output to comma separated, then do

    select top 1 * from table
    

    and cut the whole list of columns from the output window. Then you can choose which columns you want without having to type them all in.

提交回复
热议问题