views:

527

answers:

4

I want to select 15 columns from a table of 20 columns. Is there a way to exclude those 5 columns instead of specifying other 15 columns.

+2  A: 

No, you either have to select them all (*) or list the 15.

cletus
+1  A: 

I don't think it's possible, and it is not such a good idea. What if your columns change later? Than your results will not correspond to your objects. If your question comes from plain laziness than you probably should reconsider.

HeavyWave
+1  A: 

Create a view containing only the columns you'd like to get.

Puppe
A: 

Include 15 columns than excluding 5. It is a standard practice too.

(Also try to avoid *, it is not standard eventhough it works)

NinethSense