Dbs Lab Assignment
Dbs Lab Assignment
2. Create and insert the records in the table DEPT having columns
deptno(primary key), dname, loc.
Questions:
5. List the employee name, job and dept no of everyone whose name fall in the
alphabetical category range C to L from employee table.
6. List the employees whose name starts with letter k form employee table.
7. List the department name which is located in Noida and banglore from dept
table.
8. List the employee name working in department D002 , D003 from employee
table.
9. List the employees whaose name start with A and end with D from employee
table.
10. List all managers and salesman with salary over 5000 from employee table.
11. Display all employees names in alphabetical order from employee table.
12. List all employee who were hired during 1999 from employee table.
13. Rename the employee table.
14. Delete all salesman from the salesman_master whose salaries are equal to RS
2000.
17. Write aquery such that the above query can not undone.
18. Delete all employees from employee where basic salary is less than 2000.
19. Implement Update command on the above given tables.
20. Add a column in the table employee.
21. Remove a column from the employee table.
22. Change the size of the attribute 1 in the employee table.
23. Retrieve the entire contents of STUDENT table.
24. Change the City of Rollno 10056 to Kanpur.
25. Delete the Sname of table STUDENT where State=kerala.
26. Add the column pass_year into table STUDENT
27. Change the name of column Branch to Specialization.
28. Create a view VI from employee table.
29. Drop the above created view .
30. Create an index for client _no on client_master.
31. Create a view as V2 from employee table with basic sal, emp no and ename.
32. Use different SQL*Plus functions.
1. [DONE] Create and insert the records in table Client_Master. Attributes are
Client_no(Primary Key and First letter must be start with C), name(not null),,
Addres1, Address2,City, Pincode, state, Balance.
1. Display the desc and total qty sold for each product.
2. Calculate the average qty sold for each client that has a maximum order
value of 3000.
3. Find out the sum total of all the billed orders for the month of February.
4. Find out the products which have been sold to harry.
5. Find the products and their quantities that will have to be delivered in the
june month.
7. List the product_no and order_no of customers having qty_orederd less than
8 from the sales_order_detail table for the product RAM.
8. Create the report of Product_master table with total sell price and cost
price .
11. Find the names of client who have placed order before the month of june 04.
12. Find the names of client who have placed order worth RS. 3000 or more.
13. Find the products and their quantities for the order placed by harry and
potter.
14. Find the products and their quantities for the orders placed by client_no
c001 and c003.
15. Find the customer name, city and pin code for the client who placed order no
0001.
PL/SQL
4. Write a PL/SQL block. Take the salary of an employee into a variable and
check if his or salary is less than 3000 than update the salary with 5140.