Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> SQL : problem with if statement

SQL : problem with if statement

From: Astrid Ritscher <ritscher_at_isl.uni-bremen.de>
Date: 1997/08/11
Message-ID: <33ef183f.15057531@news.uni-bremen.de>#1/1

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, Germany
Received on Mon Aug 11 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US