Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> SQL : problem with if statement
Hi,
I would like to know if there is any possibility to code in PSQL
something like this (from Sybase Transact SQL):
IF EXISTS (SELECT k_num FROM kunde)
BEGIN
...
END
which tests for the existece of a certain row. This is faster than
counting the number of rows because EXISTS stops the select after
having found the first row.
Thank you for any hints,
Astrid.
-- Astrid Ritscher, ISL, Bremen, GermanyReceived on Mon Aug 11 1997 - 00:00:00 CDT
![]() |
![]() |