Tom Kelliher, CS 318
Feb. 1, 2002
The purpose of this lab will be to create two tables and insert some sample
data to get some experience with various constraints. You'll be using
psql as your PostgreSQL client.
Flavorswith the following schema:
It may take a few tries to get the syntax down, so create the SQL statement
in a text file and use
\i <file> in
psql to execute it.
Peoplewith the following schema:
SELECT * FROM <table_name>;You'll need this to examine the results of your experiments.
INSERT INTO People (Name, IceCream) VALUES ('Tom', 'Mint');What happened? Why?
INSERT INTO Flavors VALUES ('Mint', 'Bittersweet Mint', 'PSU', 'The best flavor in the whole world.');What's the syntax difference between this insert and the previous insert? Why the variants?
Peoplewith a missing
DROP TABLE People; DROP TABLE Flavors;Use