> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Jim C. Nasby
> Sent: Friday, September 30, 2005 4:49 PM
> Subject: Re: [PERFORM] [HACKERS] Query in SQL statement
 
> I suggest ditching the CamelCase and going with underline_seperators.
> I'd also not use the bareword id, instead using bad_user_id. And I'd
> name the table bad_user. But that's just me. :)

I converted a db from MS SQL, where tables and fields were CamelCase, and 
just lowercased the ddl to create the tables.

So table and fields names were all created in lowercase, but I didn't have to 
change
any of the application code: the SELECT statements worked fine with mixed case.

-- sample DDL
CREATE TABLE testtable
(
  fieldone int4
) 
insert into TestTable (fieldone) values (11);

-- These statements will both work:

-- lowercase
SELECT fieldone FROM testtable;

-- CamelCase
SELECT FieldOne FROM TestTable;

-Roger

> Jim C. Nasby, Sr. Engineering Consultant      [EMAIL PROTECTED]

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to