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

后端 未结 30 2506
花落未央
花落未央 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-22 00:07

    Wouldn't it be simpler to do this:

    sp_help 
    

    -Click on the 'Column_name' column> Copy> Paste (creates a vertical list) into a New Query window and just type commas in front of each column value... comment out the columns you don't want... far less typing than any code offered here and still manageable.

提交回复
热议问题