DBMS File
DBMS File
BCA (2023-24)
Computer Laboratory and Prac cal Work
DBMS BCA- 505
pg. 1
Q.4 Display E_name and salary of all employees
pg. 2
Q.7 List the Employee whose salary is between 20 000 to 40000.
Q.8 List all employees who belongs to 'HR' or 'MKT' or ' Prod' department.
pg. 3
Q.11 List the Employees whose name starts with P, B, R characters.
SELECT * FROM Employee
WHERE E_name LIKE 'P%' OR E_name LIKE 'B%' OR E_name LIKE 'R%';
pg. 4
Q.16 To count the total number of employees who belongs to marketing dept.
SELECT * FROM Employee
WHERE Dept = 'Marketing'
INSERT INTO salesman VALUES (5003, 'Lauson Hen', 'San Jose', 0.12);
pg. 5
Q.18 Write a SQL statement to find those salesmen with all information who come
from the city either Paris or Rome.
SELECT salesman_id, name, city, commission
FROM salesman
WHERE city IN ('Paris', 'Rome')
Q.19 Write a query to sort out those sales man with all information whose ID value is
within any of 5007, 5003 and 5005.
pg. 6
Q.20 Write a SQL statement to find those salesmen with all information who gets the
commission within a range of 0.12 and 0.14.
Q.21 Write a SQL statement to find those salesmen with all other information and
name started with any letter within 'A' and 'K'.
SELECT *
FROM salesman
WHERE name LIKE '[A-K]%';
Q.22 Write a SQL statement to find those salesmen with all other information and
name started with other than any latter within 'A' and 'L'
SELECT * FROM salesman
WHERE name NOT LIKE '[A-L]%';
pg. 7
Q.23 Write a SQL statement to find that salesman with all information whose name
begin with the letter 'P'.
Q.24 Write a SQL statement to find all those sales man with all information whose names are
ending with the letter 'n
Q.25 Select the detail of the employee whose name start with P
pg. 8