So does PRAGMA integrity_check (or any other function of SQLite) check to see
that FOREIGN KEY records are there ? Or can it in future versions ? Please ?
Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
Well, it was listed as an initial option o the trigger, so I didn't quite
get it either.
On Sat, Nov 19, 2011 at 7:02 PM, Igor Tandetnik wrote:
> Matt Young wrote:
> > sqlite> drop trigger if exists mytrigger;
> > sqlite> create trigger mytrigger
On 20 Nov 2011, at 5:04am, Matt Young wrote:
>> sqlite> drop trigger if exists mytrigger;
>> sqlite> create trigger mytrigger after insert on result
>> ...> begin
>> ...> select 'Test2';
>> ...> end;
>> sqlite> insert into result values(0,0,0);
>> sqlite>
>>
>> Explain the path of select
Matt Young wrote:
> sqlite> drop trigger if exists mytrigger;
> sqlite> create trigger mytrigger after insert on result
> ...> begin
> ...> select 'Test2';
> ...> end;
> sqlite> insert into result values(0,0,0);
> sqlite>
>
> Explain the path of select here?
What do
> so the consecutive numbers, going down from 14?
Sorry I interpreted the question in a dumb way. Igor is certainly
right (as usual).
___
sqlite-users mailing list
sqlite-users@sqlite.org
sqlite> drop trigger if exists mytrigger;
sqlite> create trigger mytrigger after insert on result
...> begin
...> select 'Test2';
...> end;
sqlite> insert into result values(0,0,0);
sqlite>
Explain the path of select here?
___
sqlite-users
Bart Smissaert wrote:
> If we have the 14 (we know to start at 14) can we select the records
> 14, 13, 12 and 11,
> so the consecutive numbers, going down from 14?
select * from MyTable t1 where
(select count(*) from MyTable t2 where t2.ID between t1.ID and 14) == 14 -
ID
1
2
3
4
11
12
13
14
If we have the 14 (we know to start at 14) can we select the records
14, 13, 12 and 11,
so the consecutive numbers, going down from 14?
Sure:
select id from yourtable where id <= 14 limit 4 order by id desc;
Say we have a table table1 with unique integer field ID.
Now we have the following data:
ID
1
2
3
4
11
12
13
14
If we have the 14 (we know to start at 14) can we select the records
14, 13, 12 and 11,
so the consecutive numbers, going down from 14?
RBS
On Fri, Nov 18, 2011 at 05:30:20PM -0800, Yang Zhang scratched on the wall:
> I just got bit by some peculiar behavior in sqlite where
>
> id int primary key
> is different from:
> id integer primary key
> In particular, sqlite will generate values for the latter but not the former:
Well,
10 matches
Mail list logo