3-2 Lab Adams

.docx

School

Southern New Hampshire University *

*We aren’t endorsed by this school

Course

220

Subject

Mechanical_engineering

Date

May 21, 2024

Type

docx

Pages

6

Uploaded by ProfessorTiger3265

DAD 220 Module Three Lab Template Connect to Database USE Adams SELECT * from Employee; Update the name of the Branches table. ALTER TABLE Branches i. RENAME TO Department; SHOW Tables; Insert fields to the Department table. INSERT INTO Department VALUES (1, 'Accounting'), (2, 'Human Resources'), (3, 'Information Systems'), (4, 'Marketing'); SELECT * FROM Department;
Perform joins between the Department and Employee tables . Department 1 = Accounting SELECT First_Name, Last_Name, Department.Department_Name FROM Employee INNER JOIN Department ON Employee.Department_ID = Department.Department_ID WHERE Employee.Department_ID = 1; Department 2 = Human Resources SELECT First_Name, Last_Name, Department.Department_Name FROM Employee INNER JOIN Department ON Employee.Department_ID = Department.Department_ID WHERE Employee.Department_ID = 2; Department 3 = Information Systems SELECT First_Name, Last_Name, Department.Department_Name FROM Employee INNER JOIN Department ON Employee.Department_ID = Department.Department_ID WHERE Employee.Department_ID = 3; Department 4 = Marketing SELECT First_Name, Last_Name, Department.Department_Name FROM Employee INNER JOIN Department ON Employee.Department_ID = Department.Department_ID WHERE Employee.Department_ID = 4;
2. Populate the Employee table with information for 10 new employees . INSERT INTO Employee VALUES (107,'Krista','Romano',1,'Non-Exempt','Full-Time',80000), (108,'Olivia','Burris',2,'Exempt','Part-Time',90000), (109,'Monique','Vanlue',3,'Non-Exempt','Full-Time',50000), (110,'Joett','Smith',4,'Exempt','Part-Time',60000), (111,'Kristna','Ocampo',1,'Non-Exempt','Full-Time',70000), (112,'Steven','Adams',2,'Exempt','Part-Time',80000), (113,'Christie','Ford',3,'Non-Exempt','Full-Time',80500), (114,'Sharon','Rainford',4,'Exempt','Part-Time',90000), (115,'Lori','Mercer',1,'Non-Exempt','Full-Time',90500), (116,'Willard','Looper',2,'Exempt','Part-Time',70500);
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help