pdate you’re the database created in week5: lab5. Write some MYSQL code to select three different sets of data and display them on the screen. Also, delete two different records from any of the table in your the database and then print the remaining data on the screen. Finally, update one of your table with five more new rows of data and print the result of the table on the screen.   /*create database CSC306Class*/ create database CSC3067Class; /*use this database to create tables*/ use CSC3067Class; create table studentInf( studentID int primary key, FirstName varchar(50), LastName varchar(50), Roles varchar(50), DobY varchar(50) ); /*inserting data into studentInf table*/ insert into studentInf values (1,'Josiah','Bartlet','President','1942'); insert into studentInf values (2,'Leo','McGarry','Cheif Of Staff','1948'); insert into studentInf values (3,'Josh','Lyman','Deputy Chief of Staff','1961'); insert into studentInf values (4,'Sam','Seaborn','Deputy Communications Director','1954'); insert into studentInf values (5,'Toby','Ziegler','White House Communications Director','1959'); select * from studentInf; create table IntructorInf( InstID int primary key, InstName varchar(50), Roles varchar(50), DobY varchar(50), Charac varchar(50) ); /*inserting data into IntructorInf table*/ insert into IntructorInf values (101,'Mrs. Landingham','Executive Secretary','1935','n/a'); insert into IntructorInf values (102,'Admiral Percy Fitzwallace',' Chairman of the JSOC','1951','John Amos'); insert into IntructorInf values (103,'Donnatella Moss','Senior Assistance to DCS','1952','Jenna Meloney'); insert into IntructorInf values (104,'Andrea Wyatt','Rep. Maryland Dist','1954','Kathleen York'); insert into IntructorInf values (105,'C.J. Cregg ','White House Press Secretary','1959','Allison Janney'); /*selecting records*/ select * from IntructorInf; create table LikedAndDisliked( LikedAndDislikedID int primary key, studentID int, InstID int, likeorDislike boolean, feedbackDate date, foreign key(studentID) references studentInf(studentID), foreign key(InstID) references IntructorInf(InstID)); /*inserting data into LikedAndDisliked table*/ insert into LikedAndDisliked values (1,1,101,true,'2020/12/11'); insert into LikedAndDisliked values (2,2,102,false,'2020/12/12'); insert into LikedAndDisliked values (3,3,103,true,'2020/12/01'); insert into LikedAndDisliked values (4,4,104,false,'2020/12/25'); insert into LikedAndDisliked values (5,5,105,true,'2020/12/30'); /*selecting records*/ select * from LikedAndDisliked; SELECT * FROM StudentInf; SELECT * FROM IntructorInf; SELECT * FROM LikedAndDisliked; DELETE FROM StudentInf WHERE studentID IN (1,2); INSERT INTO StudentInf VALUES (106, 'Bob', 'Russel', '1948', 'Presidental Candidate'); INSERT INTO StudentInf VALUES (107, 'John', 'Hoynes', '1952', 'Vice President'); INSERT INTO StudentInf VALUES (108, 'Rob', 'Jr', '1969', 'US Reps'); INSERT INTO StudentInf VALUES (109, 'Eric', 'Baker', '1968', 'Governor'); INSERT INTO StudentInf VALUES (110, 'Eirc', 'Crowley', '1965', 'Lawyer'); SELECT * FROM StudentInf;

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter13: Views
Section: Chapter Questions
Problem 7MC
icon
Related questions
Question

Please help as i am getting error after deleting student entrety for 2 entry 

 

Update you’re the database created in week5: lab5. Write some MYSQL code to select three different sets of data and display them on the screen. Also, delete two different records from any of the table in your the database and then print the remaining data on the screen. Finally, update one of your table with five more new rows of data and print the result of the table on the screen.

 

/*create database CSC306Class*/
create database CSC3067Class;

/*use this database to create tables*/
use CSC3067Class;
create table studentInf(
studentID int primary key,
FirstName varchar(50),
LastName varchar(50),
Roles varchar(50),
DobY varchar(50)
);
/*inserting data into studentInf table*/
insert into studentInf values (1,'Josiah','Bartlet','President','1942');
insert into studentInf values (2,'Leo','McGarry','Cheif Of Staff','1948');
insert into studentInf values (3,'Josh','Lyman','Deputy Chief of Staff','1961');
insert into studentInf values (4,'Sam','Seaborn','Deputy Communications Director','1954');
insert into studentInf values (5,'Toby','Ziegler','White House Communications Director','1959');
select * from studentInf;
create table IntructorInf(
InstID int primary key,
InstName varchar(50),
Roles varchar(50),
DobY varchar(50),
Charac varchar(50)
);
/*inserting data into IntructorInf table*/
insert into IntructorInf values (101,'Mrs. Landingham','Executive Secretary','1935','n/a');
insert into IntructorInf values (102,'Admiral Percy Fitzwallace',' Chairman of the JSOC','1951','John Amos');
insert into IntructorInf values (103,'Donnatella Moss','Senior Assistance to DCS','1952','Jenna Meloney');
insert into IntructorInf values (104,'Andrea Wyatt','Rep. Maryland Dist','1954','Kathleen York');
insert into IntructorInf values (105,'C.J. Cregg ','White House Press Secretary','1959','Allison Janney');
/*selecting records*/
select * from IntructorInf;
create table LikedAndDisliked(
LikedAndDislikedID int primary key,
studentID int,
InstID int,
likeorDislike boolean,
feedbackDate date,
foreign key(studentID) references studentInf(studentID),
foreign key(InstID) references IntructorInf(InstID));
/*inserting data into LikedAndDisliked table*/
insert into LikedAndDisliked values (1,1,101,true,'2020/12/11');
insert into LikedAndDisliked values (2,2,102,false,'2020/12/12');
insert into LikedAndDisliked values (3,3,103,true,'2020/12/01');
insert into LikedAndDisliked values (4,4,104,false,'2020/12/25');
insert into LikedAndDisliked values (5,5,105,true,'2020/12/30');
/*selecting records*/
select * from LikedAndDisliked;
SELECT * FROM StudentInf;
SELECT * FROM IntructorInf;
SELECT * FROM LikedAndDisliked;
DELETE FROM StudentInf WHERE studentID IN (1,2);
INSERT INTO StudentInf VALUES (106, 'Bob', 'Russel', '1948', 'Presidental Candidate');
INSERT INTO StudentInf VALUES (107, 'John', 'Hoynes', '1952', 'Vice President');
INSERT INTO StudentInf VALUES (108, 'Rob', 'Jr', '1969', 'US Reps');
INSERT INTO StudentInf VALUES (109, 'Eric', 'Baker', '1968', 'Governor');
INSERT INTO StudentInf VALUES (110, 'Eirc', 'Crowley', '1965', 'Lawyer');
SELECT * FROM StudentInf;

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 5 images

Blurred answer
Knowledge Booster
Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Enhanced Discovering Computers 2017 (Shelly Cashm…
Enhanced Discovering Computers 2017 (Shelly Cashm…
Computer Science
ISBN:
9781305657458
Author:
Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning