Home Forums SQL Server 2005 T-SQL (SS2K5) Is there a way to select all columns except one or two columns? RE: Is there a way to select all columns except one or two columns?

  • Yup, list all the column names (as you've done in your example)

    If you don't want to type, and I don't blame you, then there's a quick way. Expand out object explorer until you can see the table. Expand that out as well. Click on "Columns" and drag that to the query window and you'll have a full list of all the columns in the table, comma delimited. Then you can remove the two that you don't want.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass