From: Ken Youens-Clark Date: Fri, 27 Feb 2004 18:21:56 +0000 (+0000) Subject: Adding another data file for sqlt-diff test. X-Git-Tag: v0.06~183 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2a8f048bfb319aa4d85cbaa181bb978cdec35df4;p=dbsrgits%2FSQL-Translator.git Adding another data file for sqlt-diff test. --- diff --git a/t/data/sqlite/create2.sql b/t/data/sqlite/create2.sql new file mode 100644 index 0000000..e613fcf --- /dev/null +++ b/t/data/sqlite/create2.sql @@ -0,0 +1,31 @@ +create table person ( + person_id INTEGER PRIMARY KEY, + name varchar(20) not null, + age integer, + weight double(11,2), + iq int default '0', + is_rock_star tinyint default '1', + description text +); + +create unique index u_name on person (name); + +create table pet ( + pet_id int, + person_id int, + name varchar(30), + age int, + check ( age < 100 ), + primary key (pet_id, person_id) +); + +create trigger after insert on pet + begin + update name=name; + end + +create view person_pet as + select pr.person_id, pr.name as person_name, pt.name as pet_name + from person pr, pet pt + where person.person_id=pet.pet_id +;