
Concept explainers
Update you’re the
Create the table StudentInf:
CREATE TABLE StudentInf (
rollNo INT(4) PRIMARY KEY,
first_Name VARCHAR(50) NOT NULL,
last_Name VARCHAR(50) NOT NULL,
gender VARCHAR(10),
course VARCHAR(50)
);
Inserting data in StudentInf table:
INSERT INTO StudentInf VALUES (101, 'TONY', 'ANDREW', 'Male', 'JAVA');
INSERT INTO StudentInf VALUES (102, 'JOHN', 'MARTIS', 'Male', 'PHP');
INSERT INTO StudentInf VALUES (103, 'SWEETIE', 'JOHNSON', 'Female', 'C#');
INSERT INTO StudentInf VALUES (104, 'JIM', 'WATSON', 'Male', 'PYTHON');
INSERT INTO StudentInf VALUES (105, 'BRUCE', 'DOWNEY', 'Male', 'PHP');
Create the table IntructorInf:
CREATE TABLE InstructorInf (
id INT(4) PRIMARY KEY,
first_Name VARCHAR(50) NOT NULL,
last_Name VARCHAR(50) NOT NULL,
title VARCHAR(50),
phone_No VARCHAR(20)
);
Inserting data in IntructorInf table:
INSERT INTO InstructorInf VALUES (10, 'JOHN', 'MARTIS', 'PHP Expert', '263432446325');
INSERT INTO InstructorInf VALUES (11, 'SWEETIE', 'JOE', 'C++ Expert', '2627127834');
INSERT INTO InstructorInf VALUES (12, 'TONY', 'ANDREW', 'Java Expert', '91822233444');
INSERT INTO InstructorInf VALUES (13, 'BRUCE', 'VANDY', 'PHP Expert', '32834787713');
INSERT INTO InstructorInf VALUES (14, 'NEIL', 'WARNER', 'C# Experts', '747128578374');
Create the table LikedAndDisliked:
CREATE TABLE LikedAndDisliked (
id INT(4) PRIMARY KEY,
liked INT(4),
disliked INT(4),
comment VARCHAR(50),
rating INT(5)
);
Inserting data in LikedAndDisliked table:
INSERT INTO LikedAndDisliked VALUES (17, 4, 6, 'Good', 10);
INSERT INTO LikedAndDisliked VALUES (12, 4, 4, 'Best', 6);
INSERT INTO LikedAndDisliked VALUES (13, 8, 2, 'Average', 5);
INSERT INTO LikedAndDisliked VALUES (14, 3, 0, 'Worst', 4);
INSERT INTO LikedAndDisliked VALUES (15, 6, 2, 'Not so good', 8);

Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 3 images

- Write a select statement for the following: Join all the tables of the lunches database together (Anything table starting with L_). Show all the columns of each table. To do this, modify the select statement in this section and add the three other tables to it. How many rows and columns are in this table?arrow_forwardOpen the Missing Addresses query in Design view. Add a new column to determine if a customer does not have an address on file. If the customer’s Address is null, it should display Missing. If not, it should display nothing. Name the column AddressPresent. Add criteria of Missing to the column you just created, so only the customers missing an address display. Move the AddressPresent field so it appears between PhoneNumber and Address. Run the query. Ensure only customers with null Address fields display. Save and close the query.arrow_forwardPLZ help with the following: The manager wants to add a new painter as an artist in the database. What would the insert statement look like? For a painter to be considered in the Artist database, the painter must have painted at least one painting, however, a painting might not be exhibited in a gallery. Based on these business rules, please insert one painting for the painter that you inserted in Q1. sql file CREATE TABLE GALLERY (GAL_NUM char(4),GAL_OWNER varchar(35),GAL_AREACODE char(3),GAL_PHONE char(8),GAL_RATE number);INSERT INTO GALLERY VALUES('5','L. R. Gilliam','901','123-4456',0.37);INSERT INTO GALLERY VALUES('6','G. G. Waters','405','353-2243',0.45 );INSERT INTO GALLERY VALUES('1','N. D. Cosner','203','123-9956',0.67);INSERT INTO GALLERY VALUES('2','S. H. Artwork','415','154-3243',0.30); /* -- */ CREATE TABLE PAINTER (PTR_NUM char(4),PTR_LASTNAME varchar(15) NOT NULL,PTR_FIRSTNAME varchar(15) NOT NULL,PTR_AREACODE char(3),PTR_PHONE char(8));INSERT INTO PAINTER…arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





