Hi,
coming from imperative programming paradigma, I'm currently trying to
express something like that in _SQL_:
It should be atomic and like an API for a user. I'm therefore writing
functions:
CRETE FUNC...
c := SELECT x,y,z FROM table_a WHERE...
IF COUNT(c)=1 thenINSERT / DELETE ... WHERE x = c.x
ENDIF
LANGUAGE SQL;
How is this correctly formulated? Or is there no other way than PL/xxx?
Thanks