1. Create Database
- Write a query to create a database called
employee_management. - Create a database called
university_portal.
2. Create Table
- In the
employee_managementdatabase, create a table namedemployeeswith columns:employee_id(INT),name(VARCHAR),department(VARCHAR), andsalary(DECIMAL). - Create a table named
coursesin theuniversity_portaldatabase with columns:course_id(INT),course_name(VARCHAR),credits(INT), andinstructor(VARCHAR).
3. Insert Record
- Insert a new record into the
employeestable with appropriate values foremployee_id,name,department, andsalary. - Add a new record in the
coursestable for a course with the fieldscourse_id,course_name,credits, andinstructor.
4. Delete Record
- Delete a record from the
employeestable where theemployee_idis 5. - Remove a course from the
coursestable where thecourse_idis 101.
5. Update Record
- Update the salary of an employee in the
employeestable whereemployee_idis 3. - Change the
course_nameof a course in thecoursestable wherecourse_idis 105.
6. Add New Column
- Add a new column
email(VARCHAR) to theemployeestable. - Add a new column
semester(VARCHAR) to thecoursestable.
7. Delete Existing Column
- Remove the
emailcolumn from theemployeestable. - Drop the
semestercolumn from thecoursestable.
8. Modify the Column
- Modify the
namecolumn in theemployeestable to have a maximum of 150 characters. - Change the
creditscolumn in thecoursestable toDECIMAL(5,2)to store decimal values.