[DB-SIG] Quoting table and column names

Eugene V. Dvurechenski jno@glasnet.ru
Fri, 21 Jun 2002 15:05:16 +0400


nope.

select * from dual where "dummy" = 'X'
ORA-00904: invalid column name

select * from dual where dummy = 'X'
'X'

in Oracle you will get names case sensetive if quoted.

-jno

On Wed, Jun 19, 2002 at 02:18:14PM -0700, Ryan Weisenberger wrote:
> Is it safe to ALWAYS quote table names and column names in SQL 
> statements?  My python app queries against several different kinds of 
> databases, most notably Oracle 8 and 9, MS SQL Server 2000, and 
> Sybase.  When table and column names contain spaces or characters (':' or 
> '-'), I surround them with double quotes.  So is it safe to always do 
> this?  I thought at one time I discovered that some dbs don't like this.
> 
> Thanks,
> Ryan
> _________________________
> Ryan Weisenberger
> Software Developer
> ryanw@inktomi.com
> (650) 653-4595
> _________________________
> 
> 
> 
> _______________________________________________
> DB-SIG maillist  -  DB-SIG@python.org
> http://mail.python.org/mailman/listinfo/db-sig

-- 
SY,
jno (PRIVATE PERSON)      [ http://www.glasnet.ru/~jno ]
a TeleRoss techie         [ http://www.aviation.ru/    ]
If God meant man to fly, He'd have given him more money.