What is bad in this query ?

From: Rado Petrik <r(dot)p(at)szm(dot)sk>
To: PostgreSQL-mailinglist <pgsql-sql(at)postgresql(dot)org>
Subject: What is bad in this query ?
Date: 2003-05-02 13:21:37
Message-ID: 1051881697.29275.14.camel@caj
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

What is bad in this query ?

SELECT CASE
WHEN EXIST(SELECT * FROM user WHERE name=rado)
THEN (INSERT INTO user VALUES('rado'))
END;

PostgreSQL return

ERROR: parser: parse error at or near "INTO"

table user have only one column 'name' .

Thanks

--
Rado Petrik <r(dot)p(at)szm(dot)sk>

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Matt Mello 2003-05-02 13:44:53 Re: implied FROM
Previous Message Rajesh Kumar Mallah 2003-05-02 13:14:35 timeofday() and now() issue..