SELECT "all except" columns
Posted on 2008-10-01
Ok so here's the deal. I'm working with tables at work that were not well designed. These tables are converted flat files (from mainframe) so one table may have 50 or more columns of information (which may or may not be related). Lets say I want to pull some records from such a table but out of the 40 columns, I want all of them except 2 (those 2 being an SSN and/or a crypted password; something along those lines). Is there a quick way to say:
SELECT * (-SSN, -password) FROM [table]
instead of having to manually write out
SELECT col1, col2, col3... col37, col38 ?