0% found this document useful (0 votes)
61 views2 pages

Practical Sheet 4 PDF

The document provides instructions for a database systems lab assignment involving SQL built-in functions. Students are asked to: 1) Create a Student table with specified columns and constraints 2) Perform queries involving aggregation, string, date and math functions 3) Suffix any new tables created with their first name and last two digits of their registration number

Uploaded by

Kshitiz Sharma
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)
61 views2 pages

Practical Sheet 4 PDF

The document provides instructions for a database systems lab assignment involving SQL built-in functions. Students are asked to: 1) Create a Student table with specified columns and constraints 2) Perform queries involving aggregation, string, date and math functions 3) Suffix any new tables created with their first name and last two digits of their registration number

Uploaded by

Kshitiz Sharma
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/ 2

EXERCISE 4: SQL built in functions

Faculty Name: Dr. Abishi Chowdhury

Lab Slot: L15+L16

Class Number: CH2022235002536


Subject: Database System Lab (BCSE302P)

Date: 01/02/2023
Due Date for Submission: 01/02/2023

1. Create the following relations:


Student (sID: int, sName: varchar2(10), CGPA: int, city: varchar2(15),
phone_number: int)

2. sID must be unique and not null.


3. sName cannot take null values.
4. phone_number must be unique.
5. CGPA cannot be more than 10.
6. Insert 10 rows in Student.
7. Create a new column DoB in Student table. (Datatype will be date).
8. DoB for each Student in corresponding table.
9. Find average of CGPA round off to 2 decimal places.
10.Display name of all Students in uppercase and lowercase.
11. Find fourth alphabet of each student.
12. Find sID and sName of student whose sName has string length greater
than 3.
13. Find floor, ceiling and truncate (to one decimal place) value of average
CGPA.
14. Display details of all students whose sID is even.
15. Consider String ‘Database Systems’ replace this using the key (Hint: use
translate)
a b D e m S s t y
1 2 3 4 5 6 7 8 9

16. Compute on which date is next Saturday and last day of this month?
17.Compute Square Root of 900 and 247.

NOTE: While creating any new table suffix your first name
along with last two digits of your registration number.
Eg: STUDENT_Abishi94

You might also like