zaher dirkey wrote:
> Thank for replay, i will use it, but that make the sql slow.
>
Yes, it is slower than the insert that didn't work correctly. :-)
To ensure optimal speed you should have an index for the subselect to
use during its search. If the table has a primary key , that would be
the
Thank for replay, i will use it, but that make the sql slow.
may be SQLite team care about it in next release.
On Thu, Mar 13, 2008 at 4:59 PM, Dennis Cote <[EMAIL PROTECTED]> wrote:
> zaher dirkey wrote:
> > REPLACE INTO States
> > (Material, Name, Qnt)
> > values (1, 'MyName', Qnt + 1)
> >
> >
zaher dirkey wrote:
> REPLACE INTO States
> (Material, Name, Qnt)
> values (1, 'MyName', Qnt + 1)
>
> I want to increase value of Qnt if the record already exist and insert it
> with 1 value if not exist, the default value for Qnt is 1 and it is NOT NULL
>
The default value is only used if you d
REPLACE INTO States
(Material, Name, Qnt)
values (1, 'MyName', Qnt + 1)
I want to increase value of Qnt if the record already exist and insert it
with 1 value if not exist, the default value for Qnt is 1 and it is NOT NULL
But the record done with these values (1, 'MyName, 1)
Thanks in Advance
-
4 matches
Mail list logo