Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL query to select all columns in a table except two columns

Tags:

sql

ms-access

I have a table in ms-access with column names A to H

TableA 

A   B  C  D  E  F G  H

how can i write a query to select all columns except B and F columns. Query result should be

A C D E G H

Do we have something like this

select * from TableA except B, F ?
like image 556
silverkid Avatar asked Dec 03 '09 10:12

silverkid


1 Answers

No, we don't. You have to use

SELECT A, C, D, E, G, H 
FROM TableA

And this is good if you ask me. SELECT * is evil enough.

like image 177
Maximilian Mayerl Avatar answered Oct 19 '22 17:10

Maximilian Mayerl