0% found this document useful (0 votes)
2K views3 pages

Rdbms Lab Questions

The document contains instructions for creating various tables using SQL queries and performing operations like insert, select, delete, update on the tables. It also contains questions on writing PL/SQL programs for addition, factorial and performing CRUD operations on a master book table. The last part contains questions on writing SQL queries to retrieve data from employee and department tables by applying various conditions on columns.

Uploaded by

Siva Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views3 pages

Rdbms Lab Questions

The document contains instructions for creating various tables using SQL queries and performing operations like insert, select, delete, update on the tables. It also contains questions on writing PL/SQL programs for addition, factorial and performing CRUD operations on a master book table. The last part contains questions on writing SQL queries to retrieve data from employee and department tables by applying various conditions on columns.

Uploaded by

Siva Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

RDBMS LAB QUESTIONS

1. Create a table student with the following fields (roll no, name,
class, dob, address, mark)with suitable data types. Develop SQL
query to create, insert, select.
2. Develop SQL query to delete, update, truncate, drop.
3. Create a table Client-master with the following fields (client_no,
name, address, city, state, pin code, remarks, bal_due) with suitable
data types.
a. Create another table supplier_table from client_master.
Select all the fields and rename client_no with supplier_no and name
with supplier_name.
b. Insert data into supplier_master from client_master.
c. Delete the selected row in the client_master.

4. Create a table sales_order with s_order_no and product_no as


primary key. Set other fields to store client number, delivery address,
delivery date, order status.

a. Add a new column for storing salesman number using


ALTER Command.
b. Enforce the integrity rules using CHECK.
5. Create a table student_master with the following fields name,
regno, dept and year with suitable data types. Use Select command to
do the following.
a. Select the student’s name column.
b. Eliminate the duplicate entry in table.
c. Sort the table in alphabetical order.
d. Select all the Students of a particular department.
6. Create a table sales_order_details with the s_order_no as primary
key and with the following fields: product_no, description, qty_ordered,
qty_disp,product_rate, profit_percent, sell_price, supplier_name.
a. Select each row and compute sell_price*.50 and
sell_price*1.50 for each row selected.
b. Select product_no, profit_percent, Sell_price where profit_per
is not between 10 and 20 both inclusive.
c. Select product_no, description, profit_percent, sell_price
where profit_percent is not between 20 and 30.
d. Select the supplier name and product_no where supplier name
has ‘r’ or ‘h’ as second character

7. Write PL/SQL program to find addition of numbers.

8. Write PL/SQL program to find a factorial number.


9. Create a table master_book to contain the information of magazine
code, magazine name and publisher. Weekly/biweekly/monthly, price.
Write PL/SQL block to perform insert, update and delete operations on
the above table.

10. Create a table to contain phone number, user name, address of


the phone user. Write a function to search for a address using phone
numbers.

11. Create a table employee with the eno as primary key and with the
following fields: ename, job_type, manager, hire_date, dno,
commission, salary and set dno as a foreign key. Create reference
table department with the dno as primary key and dname .
a. Query to display Employee Name, Job, Hire Date, Employee
Number; for each employee with the Employee Number appearing first.

b. Query to display unique Jobs from the Employee Table.

c. Query to display Employee Name and Department Number for


the Employee No= 7900.
d. Query to display Unique Listing of all Jobs that are in
Department # 30.

e. Query to display the Employee No. And Name for all employees
who earn more than the average salary.

You might also like