Subject Re: [firebird-support] How to insert only if a matching row does not exist?
Author Iwan Cahyadi Sugeng
Try to read more about UPDATE OR INSERT dml statement (
http://www.firebirdsql.org/refdocs/langrefupd21-update-or-insert.html),
might be as you expected

On Thu, Oct 20, 2011 at 7:40 AM, Ed Grochowski <gastrocus@...> wrote:

> **
>
>
> Using SQL only (no stored procedures), how do I construct a statement to
> insert values into a database table, if and only if, a row containing a
> field with a specific value does not already exist?
>
> In Sql Server (and others), you can do things like the following:
>
> IFNOTEXISTS(SELECT1FROMemp WHEREfruits ='mango')
> INSERTINTOemp (fruits)VALUES('mango')
>
> What is the analogous way to achieve this in Firebird (2.5) ?
>
> [Non-text portions of this message have been removed]
>
>
>



--
Iwan Cahyadi Sugeng


[Non-text portions of this message have been removed]