Entry
Can a column name contain spaces?
How do I use a column name containing spaces in a query?
Jan 23rd, 2000 19:11
Nathan Wallace, Richard Lynch
Assume you have a table like this:
FLIGHTS:
Fields: Airline, Flight Number
So the column "Flight Number" contains spaces. To reference this column
you need to enclose it in quotes as follows:
select 'FLIGHTS.Flight Number' ...
I also would stay away from field names with spaces: Some databases
will give you grief over it, and even if they don't, the small benefit
in readability is out-weighed by the loss when you have to add
apostrophes to delimit the field.