Martin Jenkins wrote:
> T&B wrote: 
> > So, are spaces allowed or not? Is there a specification somewhere 
> > that shows what characters, length etc are allowed in column names 
> > (and table names)? 
>  
> It's an SQL thing, not an SQLite thing - if you must use spaces in 
> column names, put the column name in []. Same applies for column names 
> which are reserved words. 

Using [] is a Microsoft thing. More portable to use double quotes...

create table people("Name First", "Name Last");
insert into People values('firstname', 'lastname');
headers on
select * from people;
Name First|Name Last
firstname|lastname
select "Name First" from people;
Name First
firstname

SQLite accepts [], "" or `` to surround column names, presumably because 
Microsoft databases accept [], and MySQL accepts ``. As far as I know, all SQL 
databases accept "".

-- 
Nikki Locke, Trumphurst Ltd.      PC & Unix consultancy & programming
http://www.trumphurst.com/



-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to