Database Management System Internal Lab

BATHULA PRAVEEN (BP)
0

 Database Management System Internal Lab




1. A) Write a query to create a new table employee having the columns (attribute) employee name, salary, employee number, address, phone number, age,deptno with constraints NOT NULL, UNIQUE, PRIMARY KEY, CHECK and DEFAULT Constraints.

B) Create a Dept table with columns Deptno,Deptname,DeptLocation. Create a foreign key constraint for above dept and employee tables and show different anamolies.


2. A) Write a query for age of youngest sailor for each rating level?

B) PL/SQL Code for using trigger To display the salary difference between the old values and new values


3. A) Write a query for the names of sailors who have reserve red boat but not green boat?

B) Write a query to find details having the second highest salary from all employees


4. A) Write a query for the names of sailors who have reserve both red and green boats?(using IN and INTERSECT)

B) Write and Explain any 5 string related functions with queries?


5. A) PL/SQL CODE uses a nested basic loop to find the prime numbers from 2 to 50?

B) Write and Explain any 5 Aggregate functions with queries?


6. A) NO_DATA_FOUND: It is raised WHEN a SELECT INTO statement returns no rows?

B) Write a query for the names of sailors who have reserve both red and green boats?


7. A) PL/SQL CODE to find Minimum of two numbers using findMin( ) Procedure Procedure Creation, Procedure Calling

B) Write a query for the sid’s of sailors who’s rating is better than some sailors called horataio?


8. A) PL/SQL Code to create and a Function which counts no.of customers in above customers table.

B) PL/SQL Stored Procedures to find biggest of three numbers


9. A) PL/SQL Code for Using the Package to add, delete and list customer.

B) Write a query for the sid’s of sailors who’s rating is better than all sailors called horatio?


10. A) PL/SQL Code for using trigger To display the salary difference between the old values and new values?

B) Write a query for the names of sailors who have reserve a boat 103


Post a Comment

0Comments

Post a Comment (0)