Oracle Data Insertion
An example inserting data into Oracle
-- account INSERT INTO account (aID, aFName, aLName, aEmail, aPassword) VALUES (acc_seq.NextVal, 'Jeremy', 'Kawahara', 'jer_k_y@jer.com', 'jerjer'); INSERT INTO account (aID, aFName, aLName, aEmail, aPassword) VALUES (acc_seq.NextVal, 'Clark', 'Kent', 'superman@superheros.com', 'clark'); INSERT INTO account (aID, aFName, aLName, aEmail, aPassword) VALUES (acc_seq.NextVal, 'Peter', 'Parker', 'spiderman@superheros.com', 'peter'); INSERT INTO account (aID, aFName, aLName, aEmail, aPassword) VALUES (acc_seq.NextVal, 'Wonder', 'Woman', 'woderwoman@superheros.com', 'wonder'); -- location INSERT INTO location (lID, lCity, lProv) VALUES (loc_seq.NextVal, 'Nanaimo', 'BC'); INSERT INTO location (lID, lCity, lProv) VALUES (loc_seq.NextVal, 'Parksville', 'BC'); INSERT INTO location (lID, lCity, lProv) VALUES (loc_seq.NextVal, 'Duncan', 'BC'); INSERT INTO location (lID, lCity, lProv) VALUES (loc_seq.NextVal, 'Victoria', 'BC'); INSERT INTO location (lID, lCity, lProv) VALUES (loc_seq.NextVal, 'Smallville', 'BC'); -- tradetype INSERT INTO tradetype (tID, tName) VALUES (trade_seq.NextVal, 'Electrician'); INSERT INTO tradetype (tID, tName) VALUES (trade_seq.NextVal, 'Carpenter'); INSERT INTO tradetype (tID, tName) VALUES (trade_seq.NextVal, 'Handyman'); -- company INSERT INTO company (coID, aID, lID, coName, coPhone, coEmail,coAddress, coAcType, coDesc) VALUES (comp_seq.NextVal, '100', '101','Jers Handyman Service','250555Jere','Jer@handyman.ca','123 jer st', '01','I love being a handy man'); INSERT INTO company (coID, aID, lID, coName, coPhone, coEmail,coAddress, coAcType, coDesc) VALUES (comp_seq.NextVal, '100', '101','Jers Electric Service','250555Jere','Jer@electric.ca','123 jer st', '01','I love electricity'); INSERT INTO company (coID, aID, lID, coName, coPhone, coEmail,coAddress, coAcType, coDesc) VALUES (comp_seq.NextVal, '101', '104','Supermans Electric Service','250555super','superman@electric.ca','123 super st', '01','I love electricity and flying'); -- does INSERT INTO Does (tID, coID) VALUES (102, 100); INSERT INTO Does (tID, coID) VALUES (100, 101); INSERT INTO Does (tID, coID) VALUES (100, 102); INSERT INTO Does (tID, coID) VALUES (101, 100); -- worksIn INSERT INTO WorksIN (lID, coID) VALUES (101, 100); INSERT INTO WorksIN (lID, coID) VALUES (100, 100); INSERT INTO WorksIN (lID, coID) VALUES (101, 101); INSERT INTO WorksIN (lID, coID) VALUES (101, 102); -- rating InSERT INTO rating (rID, coID, rateNum, rateComment) VALUES (rate_seq.NextVal, '100', 5, 'Jer is great!!!');