Re: generic insert into table - Mailing list pgsql-general

From Richard Poole
Subject Re: generic insert into table
Date
Msg-id 20040607220534.GA3967@guests.deus.net
Whole thread Raw
In response to generic insert into table  (Dennis Gearon <gearond@fireserve.net>)
List pgsql-general
On Mon, Jun 07, 2004 at 02:29:33PM -0700, Dennis Gearon wrote:

> 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';

That would be

INSERT into calendar_setting (setting, value)
VALUES ('colorEvent', '#C2DCD5');

This is the standard syntax, which is not quite the same thing as
saying it will work on all DBs - it will certainly work on both
Postgres and MySQL.

Richard

pgsql-general by date:

Previous
From: Arjen van der Meijden
Date:
Subject: Re: generic insert into table
Next
From: Bill Moran
Date:
Subject: Re: core dump