EXISTS - Mailing list pgsql-sql

From Denis Woodbury
Subject EXISTS
Date
Msg-id BLU0-SMTP17A93DCE115F021F7A60FDCB340@phx.gbl
Whole thread Raw
Responses Re: EXISTS
Re: EXISTS
Re: EXISTS
List pgsql-sql
Hi,

I would like to know if this this type of statement can be used in
Postgresql

IF NOT EXISTS (SELECT 1 FROM Table WHERE col1 = 'mystring' )
BEGIN
...
END

If it can, any idea why I get this error.
********** Error **********

ERROR: syntax error at or near "IF"
SQL state: 42601
Character: 2


Thanks


denis woodbury 
denis@woodmic.net
450-242-0249





pgsql-sql by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Problem with delete trigger: how to allow only triggers to delete a row?
Next
From: "Leif B. Kristensen"
Date:
Subject: Re: EXISTS