Spr18Assign8 -Compatibility Mode -Saved to my Mac a Search in Document Home Inse
ID: 3723404 • Letter: S
Question
Spr18Assign8 -Compatibility Mode -Saved to my Mac a Search in Document Home Insert Design Layout References Mailings Review View Share Emphasis Heading1 Styles For this assignment, use your Dentist Office tables you created in Assign #6. Use just the 4 Dentist Office tables L) INSERT: Using SQL, Insert 4 rows of data to each of the Dentist Office tables that you created in Assign #7. Just make up the data that you add. You should have at least 16 SQL Insert statements to hand in. Print out these SQL statements to hand them in 2.) DELETE: Next, again using SQL, Delete the last 2 rows in each table from your Database. Use SQL Delete statements. Delete using a where clause based on the Primary key in each table. Print these SQL statements and hand them in. You should have at least 8 Deletoe 3.) UPDATE: Lastly, change all the lastnames in your "Dentists" table to "Moore". Also change the firstname of the last row of data in each possible table, to "Frank'. Change any zipcodes from CA to 90000. You should have at least 3 update statements. 4.) DROP Table: Finally, remove the entire Procedures Table. Page 1 of 2 185 words E [] Focus 119% ,' --Explanation / Answer
1) Insert into Dentist values (D001,Charles,Taylor,charlest@yahoo.com,ABC);
Insert into Dentist values (D002,Dave,Smith,DaveSmith@yahoo.com,ABC);
Insert into Dentist values (D003,Williams,Brown,WillBrown@yahoo.com,EFG);
Insert into Dentist values (D004,Andrew,Jones,Andrew@yahoo.com,PQR);
Insert into Patients values (P001,David,Smith,10 Downing Street London,davidsmith@yahoo.com,LIC);
Insert into Patients values (P002,Lena, White,74 Coleman StreetUK,lenaWhite@yahoo.com,GMAC);
Insert into Patients values (P003,Tom,Taylor,19 Chalgrove Road London,TomTaylor@yahoo.com,MetLife);
Insert into Patients values (P004,Richard,Evans,26 York street Lindon, Richard@yahoo.com,MetLife);
insert into Appointments values(2018-01-10 10:15,P001,D001,PR01);
insert into Appointments values(2018-01-10 11:15,P002,D003,PR02);
insert into Appointments values(2018-01-11 10:00 ,P003,D002,PR01);
insert into Appointments values(2018-01-10 11:30,P004,D004,PR03);
insert into Procedures values (PR01,Filling,Fill a cavity,155);
insert into Procedures values (PR02,Crown,Restore teeth,500);
insert into Procedures values (PR03,teeth whitening,Remove stains,250);
insert into Procedures values (PR04,Braces,Arrange teeth in position,8000);
2) delete from Dentist where DentId='D004;';
delete from Dentist where DentId='D003;';
delete from Patients where PatId='P004';
delete from Patients where PatId='P003';
delete from Appointments where ApptDateTime= '2018-01-11 11:30' and PatId='P004';
delete from Appointments where ApptDateTime= '2018-01-11 10:00' and PatId='P003';
delete from Procedure where ProcCode='PR04';
delete from Procedure where ProcCode='PR03';
3) Update Dentists set LastName="Moore";
Update Dentists set FirstName='Frank' where DentId='D002'; //last record
update Patients set FirstName ='Frank ' where PatId='P002' //last record
4) Drop table Procedure;
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.