On Fri, 2003-05-02 at 09:21, Rado Petrik wrote:
> Hi,
>
> What is bad in this query ?
>
> SELECT CASE
> WHEN EXIST(SELECT * FROM user WHERE name=rado)
> THEN (INSERT INTO user VALUES('rado'))
> END;
The INSERT is bad.
Try something like:
INSERT INTO user (name)SELECT name FROM user WHERE name = 'rado';
--
Rod Taylor <rbt@rbt.ca>
PGP Key: http://www.rbt.ca/rbtpub.asc