How to construct a query that selects all columns except a certain one without specifying them? The problem is how to exclude a certain column from the result of all column selection (SELECT *)? It would be quite good if one could write something like SELECT *[^code] FROM Laptop; It would let us avoid a routine error-prone work of rewriting column names and would help us to form dynamic queries when a table name neither a column count is known beforehand. Unfortunately, SQL does not provide such means. A script that produces the required list of columns can be written instead. The script would be used in queries then.