You are on page 1of 13

Assignment 1

1. Create table and insert the records as shown below, (TableName: EMP1)

EMP_ID E_NAME SALARY DEPT


101 Ajay 10000 FIN
102 Vijay 20000 HR
103 Amit 30000 HR
104 Amar 40000 IT
105 Sanjay 50000 IT
2. Create table and insert records as shown below,(Table Name: EMP2)

EMP_ID E_NAME SALARY DEPT Commission


101 Ajay 10000 FIN 2.5
102 Vijay 20000 HR 1.5
103 Amit 30000 HR 1.5
104 Amar 40000 IT 3.5
105 Sanjay 50000 IT 3.5
3. Create table and insert records as shown below,(Table Name: EMP3)

EMP_ID E_NAME SALARY DEPT Joining_Date


101 Ajay 10000 FIN 1-Jan-21
102 Vijay 20000 HR 2-Jan-21
103 Amit 30000 HR 3-Jan-21
104 Amar 40000 IT 4-Jan-21
105 Sanjay 50000 IT 5-Jan-21
4. Create below table and write the queries for given scenarios,
(TableName: EMP4)

EMP_ID E_NAME SALARY DEPT Joining_Date


101 Ajay 10000 FIN 1-Jan-21
102 Vijay 20000 HR 2-Jan-21
103 Amit 30000 HR 3-Jan-21
104 Amar 40000 IT 4-Jan-21
105 Sanjay 50000 IT 5-Jan-21
4) a. Delete those records who belongs to HR Department.
4) b.Delete those records who joined after 4-Jan-21.
4) c.Select the record who is having EMP_ID 105.
5. What is SQL?
6. What is Table?
7. What are the different datatypes available in oracl/sql? Explain at least 5
commonly used datatypes.
8. How to delete all the rows from a table.

You might also like