Question: MySQL QUESTION: Task 1: Create table Table Name: Department KIND Type Constraints DNumber Integer with 5 digits Primary key DName 30 characters unique Manager code

MySQL QUESTION:

Task 1: Create table Table Name: Department KIND Type Constraints DNumber Integer with 5 digits Primary key DName 30 characters unique Manager code 5 character Manager Start Date (MSDate) Date Write appropriate CREATE Table command and store them in a file called task1.sql and execute the SQL script file: task1.sql

Task 2: Insert Statement with string to date type conversion Implement and execute another SQL script file: task2.sql that inserts all the below instances into the table. DNumber, DName, Manager, MSD 1 'SALES' '00110', '02/01/2012; 2 'ACCOUNTING' '00120', 30/10/2010' 3 'GAMES' '00150', '01/03/2008' 4 'HUMAN RESOURCES' '00200', 02/01/2013' 5 'SPORTS', '00250', '10/05/2010'

Task 3: Alter Table / Update statement *Alter statement you change the table itself eg: 1 **Update statement you change the data within the table 1. Add a new column salary and set default to 10,000 2. Change the salary of departments that start with S to 8,000 Change Human Resource Salary and increment it by 20% Save above statements as task3.sql

Task 4: Select/ Delete Statements Write the following command to list all the rows in the department table and save it as task4.sql: SELECT * FROM Department; List the name of the departments in descending order. What is the employee number and dname of the manager of SALES and SPORTS department. Show highest and lowest salary from departments List all departments name that starts with s. List all departments with starting date between 2008 and 2013 Delete the Games department. Then list all the remaining departments.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!