Re: generic insert into table

From: Richard Poole <rp(at)guests(dot)deus(dot)net>
To: pgsql-general(at)postgresql(dot)org
Cc: Dennis Gearon <gearond(at)fireserve(dot)net>
Subject: Re: generic insert into table
Date: 2004-06-07 22:05:34
Message-ID: 20040607220534.GA3967@guests.deus.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bill Moran 2004-06-07 22:19:40 Re: core dump
Previous Message John Liu 2004-06-07 21:57:01 core dump