From 89646d2c84d070423a7726f774c479a22412ede7 Mon Sep 17 00:00:00 2001 From: Gregory Burd Date: Sat, 24 Mar 2007 23:15:20 +0100 Subject: [PATCH] added a bit more to the smoke test --- test/smoke.sql | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/test/smoke.sql b/test/smoke.sql index 9a36440..6e0ea56 100644 --- a/test/smoke.sql +++ b/test/smoke.sql @@ -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"; \ No newline at end of file