LAB ASSIGNMENT RECORD
On
(BCAMJ23452)
Database Management System Lab
COLLEGE OF COMPUTING SCIENCES AND INFORMATION
TECHNOLOGY
TMU, MORADABAD
Jan 2025 – May 2025
Submitted To: Submitted By:
Dr. Priyank Singhal (Student Name)
Associate Professor (Course, Semester, Section)
(University Enrollment No.)
LAB ASSIGNMENT NAME - Basic SQL Queries
LAB ASSIGNMENT NO. 1
Assignment 1 is based on the following Table
FIRST LAST ID AGE CITY STATE
John Jones 99980 45 Payson Arizona
Mary Jones 99982 25 Payson Arizona
Eric Edwards 88232 32 San Diego California
Mary Ann Edwards 88233 32 Phonix Arizona
Ginger Howell 98002 42 Cottonwood Arizona
Sebastian Smith 92001 23 Gila Bend Arizona
Gus Gray 22322 35 Bagdad Arizona
Mary Ann May 32326 52 Tucson Arizona
Erica William 32327 60 Show Low
Arizona
Leoroy Brown 32380 22 Pinetop Arizona
Elroy Cleaver 32382 22 Globe Arizona
S.NO PROGRAM NAME PAGE NO DATE SIGN REMARK
1 Create the table EMPINFO
with ID as a Primary key
constraint.
2 Insert all the above
mentioned values in table.
3 Select all the first
name ,last name & city
from the table whose names
starts with 'Er'
4 Select first name & last
name from the table whose
last names ends with 's'
5 Select all the details from
the table whose first name
equals 'Eric' exactly
6 Select all the details of the
table EMPINFO.
7 Display the first name &
age for everyone that is in
the table
8 Display the first name, last
name & city for everyone
that is not from 'Payson'
9 Display all columns for
everyone that is over 40
years old
10 Display the first & last
names for everyone whose
last name ends in an 'ay'
11 Display all columns for
everyone whose first name
equals 'Mary'
12 Display all the columns for
everyone whose first name
contains 'Mar'
13 Select first name , last name
& age from the table
where last name contains
'illia'
14 Select the first name , last
name , city & state whose
first name starts with 'J'
15 Display the last name and
city of employees who
belongs to Arizona and
whose age is greater than 25
16 Display the details of
employees with id 32382,
32326 and 99980.
17 Count the number of
employees who work in
Tucson and Payson
18 Display the first name and
last name in a single column
19 Display the record like :
“Hello John welcome to
Payson City” where name
and city has to be fetch from
table for all the employees
20 Display the details of
employees whose first name
and last name starts with the
same character