>> if not exists(select id from test) insert into test(id) values (280);
> Write a function in PL/pgSQL.
That particular case could be handled like so:
insert into test(id) select 280 where not exists(select id from test);
The select produces either zero or one row depending on whether its
WHE
¡¡
I can realize this function in the SYBase,but How can i do it in the PostgreSQL?
/SQL***/
if not exists(select id from test) insert into test(id) values (280);
/*/
_
ÊýÂë²úÆ·ÐÂÉÏÊУ¬¿á http://shopping.263.net/category21.htm
¾«Æ·Ð