Dbms Lab
Dbms Lab
PART A.
a) Create a table supplier with attributes s_id, s_name, address, city, country, phn_no. here s_id is
the primary key, all other fields must be not null.
PART B
QUESTION - 2
PART A ,
C, display table
D, display the details of student where name starts with A.
F, display the S_ID name whose name has U in the 3rd position.
PART B
M, find the details of the student based on their marks in ascending order.
N, find the details of the student based on their marks in descending order.
QUESTION – 3
PART A
A, Create a table named customer with field C_NO, C_NAME, PHN_NO, LOCATION.
D, find the C_NO of the customer having name=Anita and location is Kottayam.
PART B
F, display the C_NAME from customer table where C_NO is in between one & three.
G, find the C_NAME from customer table where C_NO is not in between 1 & 3.
QUESTION - 4
PART A,
PART B
F) Find the customer name who have the highest order price.
G) Find the order details of customer who have minimum order price.
QUESTION – 6
PART A
PART B
Q) Create table customer with field’s id, name, age, city, salary and display the details.
d) Display the details of customer whose salary greater than average salary of all.
QUESTION – 8
Part A
Q) Create table student with field’s id, first name, last name, age, mark and display the details.
Part B
c) Create a view student view with field id, first name, and mark.
QUESTION – 9
PART A
Q) Create table employee with field’s employee id, employee name, dept id, salary and display the
details.
Part B
Q1) Create table employee with field’s emp_no, emp name, dob, salary .
Q2) Create table department with field’s dep_no, dep name, emp_no .
a) Display all the details from the table employee and department.
QUESTION – 10
Part A
Q) Create table customer with field’s customer id, name, address and display the details.
part B
e) Find all the records from customer field where there is at least one record in the order table with the
same.
f) ) Find all the records from all customer table where there is no record in the order table with the
same customer id.
QUESTION - 12
Q) Create table employee with field’s first name, last name, designation, salary and date of joining
display the details.
d) Display the names of employees whose salary is greater than 20000 and name must be lower case.
Part B
e) Left pad the designation of the employee table with character ‘*’ the total width should be 14.
f) Right pad the designation of the employee table with character ‘*’ the total width should be 14.
g) Retrieve the first three character of the name from the table employee.
QUESTION - 13
Q) Create table employee with field’s emp no, emp name, dob, and salary.
Q) Create table department with field’s emp no, dep no and dep name.
Part B