From: | Arjen van der Meijden <acmmailing(at)vulcanus(dot)its(dot)tudelft(dot)nl> |
---|---|
To: | Dennis Gearon <gearond(at)fireserve(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: generic insert into table |
Date: | 2004-06-07 21:54:57 |
Message-ID: | 40C4E431.7010005@vulcanus.its.tudelft.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 7-6-2004 23:29, Dennis Gearon wrote:
> please CC me, I am on digest
> ---------------------------------
> I have the following code from an application that is 'mysql_centric'. I
> want to make it generic across all databases, if it's possible,
> especially postgres :-)
>
> mysql version:
> INSERT INTO calendar_setting SET setting='colorEvent',value='#C2DCD5';
>
> There is no data in this table at this time.
> Isn't this the same as:
> INSERT INTO calendar_setting( 'colorEvent' ) VALUES ( '#C2DCD5');
>
> would this work on all db's?
>
Afaik your first example is equal to:
INSERT INTO calendar_setting( setting, value) VALUES ('colorEvent',
'#C2DCD5');
Your first example isn't really SQL-standard and you'd perhaps better
try using SQL-standard stuff as much as possible on MySQL aswell. The
INSERT ... SET-version of INSERT wouldn't be my version to use.
Best regards,
Arjen
From | Date | Subject | |
---|---|---|---|
Next Message | John Liu | 2004-06-07 21:57:01 | core dump |
Previous Message | Dennis Gearon | 2004-06-07 21:29:33 | generic insert into table |