added a bit more to the smoke test

This commit is contained in:
Gregory Burd 2007-03-24 23:15:20 +01:00
parent f1037cdd9a
commit 89646d2c84

View file

@ -3,6 +3,7 @@ CREATE TABLE Person (
fname TEXT(20),
lname TEXT(40),
ssn TEXT(11));
CREATE TABLE Address (
person_fk NUMBER(3),
first_line TEXT(30),
@ -10,9 +11,27 @@ CREATE TABLE Address (
city TEXT(30),
state TEXT(2),
zip TEXT(5));
CREATE TABLE Phone (
person_fk NUMBER(3),
type TEXT(20),
number TEXT(15));
INSERT INTO Person VALUES (1,"John", "Doe", "111-22-3333");
INSERT INTO Person VALUES (2, "Jane", "Doe", "222-33-4444");
INSERT INTO Person VALUES (3, "Judy", "Schaab", "888-22-0001");
INSERT INTO Address VALUES (1, "20 First St.", "# 2", "Boston", "MA", "02110");
INSERT INTO Address VALUES (2, "20 First St.", "# 2", "Boston", "MA", "02110");
INSERT INTO Address VALUES (3, "11600 Academy Rd NE", "Apt 4511", "Albuquerque", "NM", "87111");
INSERT INTO Phone VALUES (1, "home", "617-123-4567");
INSERT INTO Phone VALUES (2, "cell", "617-222-8777");
INSERT INTO Phone VALUES (3, "home", "505-243-4670");
INSERT INTO Phone VALUES (3, "cell", "505-259-7789");
select city from Person, Address where person_fk = id and id = 1;
select number from Person, Phone where person_fk = id and fname = "Judy" and lname = "Schaab";
select * from Phone where type = "cell";
select number from Person, Phone where person_fk = id and fname = "Judy" and lname = "Schaab" and type = "cell";
select number from Person, Phone where person_fk = id and ssn = "888-22-0001" and type = "cell";