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

Lab Experiment 4

The document contains questions related to SQL queries on tables client master, product master and employee. It asks to perform operations like changing fields, deleting records, finding records based on conditions, sorting, counting and calculating aggregate functions on the tables.

Uploaded by

Sumit Patil
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
201 views

Lab Experiment 4

The document contains questions related to SQL queries on tables client master, product master and employee. It asks to perform operations like changing fields, deleting records, finding records based on conditions, sorting, counting and calculating aggregate functions on the tables.

Uploaded by

Sumit Patil
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Lab Experiment 4

Q1) Using the table client master and product master answer the
following Questionnaires.

i) Change the selling price of ‘1.44 floppy drive to Rs.1150.00


ii) Delete the record with client 0001 from the client master table.

iii) Change the city of client_no’0005’ to Bombay


iv) Change the bal_due of client_no ‘0001, to 1000.

v) Find the products whose selling price is more than 1500 and also
find the new selling price as original selling price *15.
vi) Find out the clients who stay in a city whose second letter is a.
vii) Find out the name of all clients having ‘a’ as the second letter in
their names.

viii) List the products in sorted order of their description.


ix) Count the total number of orders

x) Calculate the average price of all the products.

xi) Calculate the minimum price of products.


xii) Determine the maximum and minimum prices . Rename the tittle
as ‘max_price’ and min_price respectively.

xiii) Count the number of products having price greater than or equal
to 1500.
Q2) Create a table EMPLOYEE with following schema:

(Emp_no, E_name, E_address, E_ph_no, Dept_no,


Dept_name,Job_id , Salary)
2) Add a new column; HIREDATE to the existing relation.

3. Change the datatype of JOB_ID from char to varchar2.

4. Change the name of column/field Emp_no to E_no.


5. Modify the column width of the job field of emp table.
Q3) Create a table EMPLOYEE with following schema:

(Emp_no, E_name, E_address, E_ph_no, Dept_no,


Dept_name,Job_id , Salary)

Write SQL queries for following question:

1. Insert aleast 5 rows in the table.


2. Display all the information of EMP table.
3. Display the record of each employee who works in department
D10.

4. Update the city of Emp_no-12 with current city as Nagpur.


5. Display the details of Employee who works in department
MECH.

6. Delete the email_id of employee James.


7. Display the complete record of employees working in SALES
Department.

You might also like