Welcome to the CHICKEN Scheme pasting service

sqlite's magic rowid pasted by alaricsp on Tue Oct 18 15:19:00 2011

sqlite> create table foo (pk integer primary key not null, bar text);
sqlite> insert into foo values (10,'ten');
sqlite> insert into foo values (20,'twenty');
sqlite> select rowid, pk, bar from foo;
10|10|ten
20|20|twenty
sqlite> insert into foo values ('thirty','thirty');
Error: datatype mismatch
sqlite> insert into foo values (30,30);
sqlite> select rowid, pk, bar from foo;
10|10|ten
20|20|twenty
30|30|30

It's OK to insert strings into non-PK integer fields added by alaricsp on Tue Oct 18 15:21:04 2011

sqlite> alter table foo add column baz integer;
sqlite> insert into foo values (40,40,'forty');
sqlite> select rowid, pk, bar, baz from foo;
10|10|ten|
20|20|twenty|
30|30|30|
40|40|40|forty

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Name of the CHICKEN extension manager:
Visually impaired? Let me spell it for you (wav file) download WAV