> When i do a insert is there a way to know row already exists!!
Not without querying.
But you could do something like this:
CREATE TABLE t1(a PRIMARY KEY, b, c);
insert into t1
select 7, 'foo', 'bar' where not exists (
select null from t1 where a=7);
which is similar to:
endraK 70574
Date: Thursday, July 19, 2007 5:17 pm
Subject: [sqlite] Duplicate Row check
> Hi,
>
> How can check if a row exists in the db or not without querying for
> it?
> regards
> ragha
>
>
> **
--Original Message-
From: RaghavendraK 70574 [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 19, 2007 8:00 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Duplicate Row check
Q was incomplete.
When i do a insert is there a way to know row already exists!!
reg
On 7/19/07, RaghavendraK 70574 <[EMAIL PROTECTED]> wrote:
Q was incomplete.
When i do a insert is there a way to know row already exists!!
what is the definition of "row already exists"? If you are concerned
about a particular column, make that into a PK. If you are concerned
about all the
> How can check if a row exists in the db or not without querying for it?
Isn't the very act of asking whether it exists a query unto itself?
Looking for a deal? Find great prices on flights and hotels
sqlite] Duplicate Row check
> Hi,
>
> How can check if a row exists in the db or not without querying for
> it?
> regards
> ragha
>
>
> **
> This email and its attachments contain con
Hi,
How can check if a row exists in the db or not without querying for it?
regards
ragha
**
This email and its attachments contain confidential information from HUAWEI,
which is intended only for the
7 matches
Mail list logo