REM //////////////////////////////////////////////////////////////////////////////////////////
REM Example SQL table for SQLiteVB 
REM M Shaw - 26th July 2008 - This database compilation is placed into the public domain
REM http://vbtoolbox.amadis.sytes.net (sqlite.htm)
REM Originally from an example by Nikolai Shokhirev
REM http://www.shokhirev.com/nikolai/abc/sql/sql.html
REM Repopulated with more interesting data!
REM //////////////////////////////////////////////////////////////////////////////////////////

REM Lines prefixed with a REM will not be loaded into the demo script interface
REM Empty lines will not be loaded into the script interface either
REM An SQLite comment is "--" not REM! I implemented REM only for the demo program ;)

REM To rerun this script you may need to use the following first (alone)
-- 26/July/2008
-- ** WARNING ** THIS SCRIPT WILL DROP TWO TABLES ** WARNING **
DROP TABLE IF EXISTS artists; 
DROP TABLE IF EXISTS CDs;
-- ** WARNING ** THIS SCRIPT WILL DROP TWO TABLES ** WARNING **

REM //////////////////////////////////////////////////////////////////////////////////////////
REM After much fiddling about it seems that the default is for "atomic transaction" which
REM prevents DROP TABLE and CREATE TABLE following each other
REM if you start the file with BEGIN; and end with COMMIT; you can drop the tables, create
REM new ones, insert the data and then query
REM Drop/Create may fail if you wrap BEGIN...END but have alrady dropped the tables
REM //////////////////////////////////////////////////////////////////////////////////////////
 
CREATE TABLE IF NOT EXISTS Artists (ArtistID INTEGER PRIMARY KEY, ArtistName TEXT);
CREATE TABLE IF NOT EXISTS CDs (CDID INTEGER PRIMARY KEY, ArtistID INTEGER NOT NULL, Title TEXT NOT NULL, Date TEXT);
--NOTE: Multiple inserts may take a disproportionally long time to update without BEGIN;...COMMIT;
BEGIN;
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'Puddle of Mudd');
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'Frank Zappa');
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'Love/Hate');
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'Cheap Trick');
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'Megadeth');
REM 5
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'Foo Fighters');
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'Evanescence');
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'Genesis');
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'Pink Floyd');
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'Cliff Martinez');
REM 10
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'Wraith');
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'Rush');
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'Yes');
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'Yello');
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'Jethro Tull');
REM 15
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'REM');
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'Coldplay');
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'Def Leppard');
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'Warrant');
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'Budgie');
REM 20
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'Wisbone Ash');
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'All About Eve');
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'Roxy Music');
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'Camel');
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'Guns n Roses');
REM 25
INSERT INTO Artists (ArtistID,ArtistName) values (NULL,'Emerson Lake and Palmer');

REM Now add some data...
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,1,'Come Clean','2001');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,1,'Abrasive','1997');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,1,'Life on Display','2003');

INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,2,'Freak Out','1966');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,2,'Absolutely Free','1967');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,2,'Weasels Ripped My Flesh','1970');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,2,'200 Motels','1971');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,2,'The Grand Wazoo','1972');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,2,'Sheik Yerbouti','1979');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,2,'Joes Garage','1979');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,2,'Ship Arriving Too Late to Save a Drowning Witch','1982');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,2,'The Man From Utopia','1983');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,2,'You Are What You Is','1981');

INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,3,'Black Out in The Red Room','1990');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,3,'Wasted in America','1992');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,3,'Lets Rumble','1993');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,3,'Im Not Happy','1995');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,3,'Livin off Layla','1997');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,3,'Lets Eat','1999');

INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,4,'Cheap Trick','1977');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,4,'In Color','1977');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,4,'Heaven Tonight','1978');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,4,'Dream Police','1979');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,4,'All Shook Up','1980');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,4,'Found All The Parts','1980');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,4,'One on One','1982');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,4,'Next Position Please','1983');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,4,'Standing on the Edge','1985');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,4,'The Doctor','1986');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,4,'Lap of luxury','1988');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,4,'Busted','1990');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,4,'Greatest Hits','1991');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,4,'Woke Up With A Monster','1994');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,4,'Cheap Trick','1997');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,4,'Special One','2003');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,4,'Rockford','2006');

INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,5,'Rust in Peace','1990');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,5,'Peace Sells...','1980');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,5,'Risk','1999');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,5,'United Abominations ','2007');

INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,6,'Foo Fighters','1995');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,6,'The Color and The Shape','1997');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,6,'There is Nothing Left To Lose','1999');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,6,'One By One','2002');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,6,'In Your Honour','2005');

INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,7,'Fallen','2003');

INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,8,'From Genesis to Revelation','1969');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,8,'Trespass','1970');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,8,'Nursery Cryme','1971');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,8,'Foxtrot','1972');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,8,'Selling England By The Pound','1973');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,8,'Lamb Lies Down on Broadway','1974');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,8,'Trick of the Tail','1976');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,8,'Wind and Wuthering','1976');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,8,'... and Then There Were Three','1978');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,8,'Duke','1980');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,8,'Acab','1981');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,8,'Genesis','1983');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,8,'Invisible Touch','1986');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,8,'We Cant Dance','1991');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,8,'Calling all Stations','1997');

INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,9,'Piper at the Gates of Dawn','1967');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,9,'Saucer Full of Secrets','1968');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,9,'Ummagumma','1969');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,9,'Atom Heart Mother','1970');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,9,'Meddle','1971');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,9,'Obscured by Clouds','1972');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,9,'Dark Side of The Moon','1973');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,9,'Wish You Were Here','1975');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,9,'Animals','1977');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,9,'The Wall','1979');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,9,'The Final Cut','1983');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,9,'A Momentary Lapse of Reason','1987');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,9,'The Division Bell','1994');

INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,10,'Solaris','2002');
REM http://www.metal-archives.com/band.php?id=28960 - check Riot out!
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,11,'Naked Agression','1989');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,11,'Riot','1993');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,11,'Schizophrenia','1996');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,11,'Evolution','2007');

INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,12,'Rush','1974');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,12,'Fly By Night','1975');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,12,'Caress of Steel','1975');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,12,'2112','1976');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,12,'A Farewell to Kings','1977');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,12,'Hemispheres','1978');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,12,'Permanent Waves','1980');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,12,'Moving Pictures','1981');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,12,'Signals','1982');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,12,'Grace Under Pressure','1984');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,12,'Power Windows','1985');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,12,'Hold Your Fire','1987');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,12,'Presto','1989');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,12,'Roll The Bones','1991');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,12,'Counterparts','1993');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,12,'Vapor Trails','2002');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,12,'Snakes and Arrows','2007');

INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,13,'Yes','1969');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,13,'Time and a Word','1970');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,13,'The Yes Album','1971');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,13,'Fragile','1971');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,13,'Close To The Edge','1972');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,13,'Tales from Topographic Oceans','1973');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,13,'Relayer','1974');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,13,'Going for the One','1977');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,13,'Tormato','1978');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,13,'Time and a Word','1970');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,13,'Drama','1980');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,13,'90125','1983');

INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,14,'Stella','1985');

INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,15,'This Was','1968');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,15,'Aqualung','1971');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,15,'Thick as a Brick','1972');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,15,'Heavy Horses','1978');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,15,'A','1980');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,15,'Broadsword and the Beast','1982');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,15,'Crest of a Knave','1987');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,15,'Rock Island','1981');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,15,'Catfish Risiing','1991');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,15,'J-Tull Dot Com','1999');

INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,16,'Green','1988');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,16,'Out of Time','1991');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,16,'Automatic for the People','1992');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,16,'Monster','1994');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,16,'New Adventures in Hi-Fi','1996');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,16,'Up','1998');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,16,'Reveal','2001');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,16,'Around the Sun','2004');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,16,'Accelerate','2008');

INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,17,'Parachutes','2000');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,17,'A Rush of Blood To The Head','2002');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,17,'X&Y','2005');

INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,18,'On Through The Night','1980');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,18,'Pyromania','1983');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,18,'Hysteria','1987');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,18,'Adrenalise','1992');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,18,'Slang','1996');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,18,'X','2002');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,19,'Dirty Rotten Filthy Stinking Rich','1989');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,19,'Cherry Pie','1990');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,19,'Dog Eat Dog','1992');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,19,'Ultraphobic','1995');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,19,'Belly to Belly','1996');

INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,20,'Budgie','1971');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,20,'Squawk','1972');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,20,'Never Turn Yuor Back on a Friend','1973');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,20,'In For The Kill','1974');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,20,'Bandolier','1975');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,20,'If I Were Brittannia Id Wave The Rules','1976');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,20,'Impeckable','1978');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,20,'Power Supply','1980');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,20,'Nightlight','1981');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,20,'Deliver Us From Evil','1982');

INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,21,'Wishbone Ash','1970');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,21,'Pilgrimage','1971');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,21,'Argus','1970');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,21,'Wishbone Four','1973');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,21,'Theres The Rub','1974');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,21,'Locked In','1976');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,21,'New England','1976');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,21,'Front Page News','1977');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,21,'No Smoke Without Fire','1978');

INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,22,'All About Eve','1988');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,22,'Scarlet and Other Stories','1989');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,22,'Untouched By Jesus','1991');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,22,'Ultraviolet','1992');

INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,23,'Roxy Music','1972');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,23,'For Your Pleasure','1973');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,23,'Stranded','1973');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,23,'Country Life','1974');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,23,'Siren','1975');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,23,'Manifesto','1979');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,23,'Flesh and Blood','1980');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,23,'Avalon','1982');

INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,24,'Camel','1973');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,24,'Mirage','1974');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,24,'The Snow Goose','1975');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,24,'Moonmadness','1976');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,24,'Rain Dances','1977');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,24,'Breathless','1978');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,24,'I Can See Your House From Here','1979');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,24,'Nude','1981');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,24,'The Single Factor','1973');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,24,'Stationary Traveller','1984');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,24,'Dust and Dreams','1991');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,24,'Harbour of Tears','1996');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,24,'Rajaz','1999');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,24,'A Nod and a Wink','2002');

INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,25,'Appetite for Destruction','1987');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,25,'Lies','1988');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,25,'Use Your Illusion I','1991');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,25,'Use Your Illusion II','1991');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,25,'The Spaghetti Incident','1993');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,25,'Chinese Democracy','2012');

INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,26,'Emerson Lake and Palmer','1970');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,26,'Tarkus','1971');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,26,'Pictures at an Exhibition','1971');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,26,'Welcome back my friends...','1974');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,26,'Trilogy','1972');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,26,'Brain Salad Surgery','1973');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,26,'Works I','1977');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,26,'Works II','1977');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,26,'Love Beach','1978');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,26,'In Concert','1979');
INSERT INTO CDs (CDID,ArtistID,Title,Date) values (NULL,26,'Black Moon','1992');

REM Perform a query
REM For some reason using a SELECT in the same script throws error 1 if BEGIN;...COMMIT; not used
REM use the SELECT query separately
-- SELECT * from Artists;
-- do a relational SELECT on both tables linked ...
SELECT t1.ArtistName,CDs.Title,CDs.date FROM Artists t1, CDs WHERE t1.ArtistID=CDs.ArtistID ORDER BY ArtistName
COMMIT;
REM EOF ////////////////////////////////////////////////////////////////////////////////////