0% found this document useful (0 votes)
40 views

Assignment 1 Solution

The document provides instructions to create and populate multiple tables with employee data. It then asks the reader to perform various SQL queries on the data: 1. Create three tables (EMP1, EMP2, EMP3) and populate them with employee records including ID, name, salary, department, and additional fields like commission and hire date. 2. Create a fourth table (EMP4) with the same fields and populate it with the employee records. 3. Write queries to delete records for employees in the HR department, hired after a certain date, and to select a specific employee's record. 4. The document concludes by asking about the definition of SQL, what a table is, examples of

Uploaded by

Alankar dhakate
Copyright
© © All Rights Reserved
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% found this document useful (0 votes)
40 views

Assignment 1 Solution

The document provides instructions to create and populate multiple tables with employee data. It then asks the reader to perform various SQL queries on the data: 1. Create three tables (EMP1, EMP2, EMP3) and populate them with employee records including ID, name, salary, department, and additional fields like commission and hire date. 2. Create a fourth table (EMP4) with the same fields and populate it with the employee records. 3. Write queries to delete records for employees in the HR department, hired after a certain date, and to select a specific employee's record. 4. The document concludes by asking about the definition of SQL, what a table is, examples of

Uploaded by

Alankar dhakate
Copyright
© © All Rights Reserved
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/ 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

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy