Professional Documents
Culture Documents
Dbmslab3
Dbmslab3
___________________________________________________________________________________
Experiment Number 3
Experiment Title Data Management and retrival
Date of Experiment 07/02/2024
Date of Submission 07/02/2024
1. Problem Statement:
Display all employee names (last name and first name separated by a comma
and a space) and salary with appropriate column aliases.
Display all employees who do not get any commission.
Display unique building names from LOCATION table.
Display all course sections offered in Winter 2003.
Display names of faculty members who work in department 1 or 2. Use IN
operator in your query.Find all New York and New Jersey students.
Give a 10% raise to employee number 111.
Delete department number 30 from the department table. If it is not successful,
write down your suggestion to make it work.
For each course ID, display the maximum count in descending order.
Insert a new term in the TERM table.
Create a custom prompt for user to input any value betwwen 50 and 99 into
DeptId column.
Find courses with no required prerequisite.
Display faculty names in descending order by their department, but in
alphabetical order by their name within each department.
Find faculty members whose name start with C.
Find students who started in year 2003. Use start term column and wild card.
2. Theory:
___________________________________________________________________________________
VALUES: Specifies the values to be inserted into the columns.
IN: Specifies multiple values in a WHERE clause.
LIKE: Searches for a specified pattern in a column.
ASC/DESC: Specifies the sorting order (ascending or descending).
NULL: Represents missing or unknown data.
IS NULL: Filters rows where the specified column is NULL.
MAX: Returns the maximum value in a set of values.
___________________________________________________________________________________
Submitted by:
Name: Nikhil Kumar
Roll No.: 2230030
DATABASE MANAGEMENT LAB (CS 29006)
School of Electronics Engineering
___________________________________________________________________________________
select distinct building from location;
___________________________________________________________________________________
Submitted by:
Name: Nikhil Kumar
Roll No.: 2230030
DATABASE MANAGEMENT LAB (CS 29006)
School of Electronics Engineering
___________________________________________________________________________________
select first_name from student where city in("new york","chicago");
After:-
___________________________________________________________________________________
Submitted by:
Name: Nikhil Kumar
Roll No.: 2230030
DATABASE MANAGEMENT LAB (CS 29006)
School of Electronics Engineering
___________________________________________________________________________________
update department set dept_name=null where dept_id=2 ;
/* Create a custom prompt for user to input any value betwwen 50 and 99 into
DeptId column.*/
___________________________________________________________________________________
Submitted by:
Name: Nikhil Kumar
Roll No.: 2230030
DATABASE MANAGEMENT LAB (CS 29006)
School of Electronics Engineering
___________________________________________________________________________________
___________________________________________________________________________________
Submitted by:
Name: Nikhil Kumar
Roll No.: 2230030
DATABASE MANAGEMENT LAB (CS 29006)
School of Electronics Engineering
___________________________________________________________________________________
SELECT * FROM student WHERE start_term =2020;
4. Concluding Remarks:
___________________________________________________________________________________
Submitted by:
Name: Nikhil Kumar
Roll No.: 2230030
DATABASE MANAGEMENT LAB (CS 29006)
School of Electronics Engineering
___________________________________________________________________________________
___________________________________________________________________________________
Submitted by:
Name: Nikhil Kumar
Roll No.: 2230030