Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IF EXISTS . . ?

Status
Not open for further replies.

woyler

Programmer
Jun 20, 2001
678
US
Hello all,
Is there a DB2 syntax for the following type of query(not in a stored procedure)?

IF EXISTS (SELECT x FROM table WHERE something = "this")
UPDATE table SET ............
ELSE
INSERT INTO table ...........

thanks in advance,
Bill
 
Nope (AFAIK), this is not an SQL query, but should be part of a stored procedure..

Ties Blom
Information analyst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top