2
1. Create following table Student(student_id,sname,sdob,socurse,course_id) and Student_id is Primary Key. a) Write SQL query for displaying student names ending with letter‘s’. b) Write SQL query for displaying student information sorted on scourse in descending order. c) Write SQL query for performing substring operation. d) Write pl/sql block to implement cursor? 2. Create following table Customer(cust_id,cname,ccity,cdop,branch_id) and cust_id is Primary Key. a) Write SQL query for displaying customers who are not living in Hyderabad? b) Write SQL query for displaying customer details who have purchased after August-15-2013? c) Write SQL query for performing Lpad nand Rpad operations in a single statement? d) Write pl/sql block to implement Trigger? 3. Create following table Employee(eno,ename,ejob,esal,edoj,deptno) and eno is Primary Key. a) Write SQL query for displaying employee names having character ‘a’ at any position? b) Write SQL query for displaying employee details who had 2 nd highest salary? c) Write SQL query to perform ceil and round operations? d) Write pl/sql block to implement Exception Handing? 4. Create following table Department(dno,dname,dlocation,dmgr,cust_id) and dno is primary key. a) Write SQL query for displaying department names in sorting order on their manager ascending order? b) Write SQL query for displaying department names which has only 5 characters? c) Write SQL query for performing Ltrim nand Rtrim operations in a single statement?

Dbms Cis 2 Internal

Embed Size (px)

DESCRIPTION

ss

Citation preview

1. Create following tableStudent(student_id,sname,sdob,socurse,course_id) and Student_id is Primary Key.a) Write SQL query for displaying student names ending with letters.b) Write SQL query for displaying student information sorted on scourse in descending order.c) Write SQL query for performing substring operation.d) Write pl/sql block to implement cursor?2. Create following tableCustomer(cust_id,cname,ccity,cdop,branch_id) and cust_id is Primary Key.a) Write SQL query for displaying customers who are not living in Hyderabad?b) Write SQL query for displaying customer details who have purchased after August-15-2013?c) Write SQL query for performing Lpad nand Rpad operations in a single statement?d) Write pl/sql block to implement Trigger?3. Create following tableEmployee(eno,ename,ejob,esal,edoj,deptno) and eno is Primary Key.a) Write SQL query for displaying employee names having character a at any position?b) Write SQL query for displaying employee details who had 2nd highest salary?c) Write SQL query to perform ceil and round operations?d) Write pl/sql block to implement Exception Handing?4. Create following tableDepartment(dno,dname,dlocation,dmgr,cust_id) and dno is primary key.a) Write SQL query for displaying department names in sorting order on their manager ascending order?b) Write SQL query for displaying department names which has only 5 characters?c) Write SQL query for performing Ltrim nand Rtrim operations in a single statement?d) Write pl/sql block to implement any function?5. Create following tableProduct(pid,pname,pdom,pcost,eno) wher pid is a primary key.a) Write SQL query for displaying product information which has cost less than 300 or greater than 500?b) Write SQL query for displaying product names that starts with character a?c) Write SQL query for performing absolute and floor operations?d) Write pl/sql block to find grade of a student?