Re: [HACKERS] SQL( "if ...exists...),how to do it in the PostgreSQL?

2001-06-06 Thread Tom Lane
>> 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

[HACKERS] SQL( "if ...exists...),how to do it in the PostgreSQL?

2001-06-05 Thread Eric
¡¡ 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 ¾«Æ·Ð