Practical List
Practical List
3. Consider schema Candidate (C_id, Seat_no, Name, Score, City) Write SQL Command for
following
i. Display Candidate who scored between 60 and 70 Marks.
ii. Display Candidate whose city is either Pune or Mumbai.
iii. Produce record of candidate who belongs to Nashik and scored more than 60 marks.
iv. Change the city of candidate C_10 from Pune to Mumbai.
12. Write a PL/SQL code to raise zero_divide exception, in case of division of a number by
another.
16. Give syntax for creating a view. Consider following schema- ACCOUNT (Account_No, Name,
Account_Type, PAN_Number, Balance). Create a view on ACCOUNT having attributes
(Account_No, Name, PAN_Number) where balance is less than 10,000.
17. Consider the following data base scheme student (roll_no, name, city, marks, result). Write
queries for the following:
(i) Display all students having result as first class.
(ii) Update roll-no of each student by adding 18 to it.
(iii) Delete percent column from table.
(iv) Display student whose city is ‘Mumbai’
19. Write PL/SQL code using user defined exception for following scenario.
If salary of employee is greater than 20,000 after giving raise by 20% then raise exception stating
“Salary too high”.
20. Create employee table with following Integrity constraints. employee (empid, ename,
phone, dob, addr, designation salary, deptno)
(i) empid as primary key
(ii) Phone as unique
(iii) deptno as not null
Also create dept table as dept (deptno, dname, totalemp)
where deptno as primary key and totalemp with check
constraint as totalemp > 10