1. Create a DEPT table with columns Deptno, Dname, and Location and insert sample data.
2. Insert a new record into the DEPT table for department 99 with the name "education" located in "Mani".
3. Perform basic CRUD operations on EMP and DEPT tables like inserts, updates, deletes, and selects.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
71 views1 page
Dbms Lab Exercise No:2 Basic SQL Queries
1. Create a DEPT table with columns Deptno, Dname, and Location and insert sample data.
2. Insert a new record into the DEPT table for department 99 with the name "education" located in "Mani".
3. Perform basic CRUD operations on EMP and DEPT tables like inserts, updates, deletes, and selects.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1
DBMS LAB
Exercise No:2 BASIC SQL QUERIES
1. Create table DEPT with following columns and data types.
Cloumn Name null Data type Deptno not null number(2) Dname char(14) Location char(13) 2. Insert in the DEPT table the following rows Deptno dname location 10 Accounting Newyork 20 Research Chicago 30 Sales Dallas 40 Operations Boston 3. Insert yourself as a new employee into EMP table. 4. Add a new department into the DEPT table with a department number of 99 location of Mani, and a department name of education. 5. Update your own employee data by giving yourself a raise of $1000 per month. 6. View the changes you have just done. 7. Delete yourself from the EMP table. 8. Select from EMP table to check whether the row is existing. 9. Create a duplicate EMP table name is EMPTEST. 10. Add a new column named SEX to the EMPTEST table with data type of character and length 1. 11. Display and see the structure of table EMPTEST. 12. The user have changed their mind. Instead of storing SEX as F or M, they want to store SEX as MALE or FEMALE. So increase the size of the SEX column. 13. Display each employee’s name and hire date. 14. Display the information in the above query with hire date appearing first.