CREATE TABLE authors (
au_id AUTONUMBER PRIMARY KEY,
au_lname SHORT TEXT,
au_fname SHORT TEXT,
phone SHORT TEXT,
address SHORT TEXT,
city SHORT TEXT,
state SHORT TEXT,
zip SHORT TEXT,
contract YES/NO );
SELECT DISTINCT state FROM authors;
SELECT au_id, au_lname, au_fname, state
FROM authors WHERE state = @state;
SELECT au_id, au_lname, au_fname, phone, address, city, state,
zip, contract
FROM authors WHERE au_id = @au_id;
UPDATE authors SET au_lname = @au_lname, au_fname = @au_fname,
phone = @phone, address = @address, city = @city,
state = @state, zip = @zip, contract = @contract
WHERE au_id = @au_id;
INSERT INTO authors( au_id, au_lname, au_fname, phone, address,
city, state, zip, contract )
VALUES( @au_id, @au_lname, @au_fname, @phone, @address, @city,
@state, @zip, @contract );
DELETE FROM authors WHERE au_id = @au_id;
|