* Nikki Locke <[EMAIL PROTECTED]> [2006-08-30 14:40]:
> Using [] is a Microsoft thing. More portable to use double
> quotes...

I’d use the square brackets anyway.

    sqlite> create table foo ( "bar baz" text );
    sqlite> insert into foo values ( "quux" );

OK…

    sqlite> select [bar baz] from foo;
    quux

Obviously. Now let’s make a typo:

    sqlite> select [baz baz] from foo;
    SQL error: no such column: baz baz

Caught it, good.

    sqlite> select "bar baz" from foo;
    quux

As expected. Now let’s mistype it.

    sqlite> select "baz baz" from foo;
    baz baz

Oops.

In other words, if yoz like spurious bugs, then feel free to use
double quotes. If you prefer robust code, then you’ll stay away
from them.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

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

Reply via email to