DBMS Assginment06
DBMS Assginment06
Section – AJ 15
Univ. Roll no. – 2215001306
Lab Assignment – 6
1. Create a new column DoB in Student table. (Datatype will be date)
Alter table student add DoB date ;
8. Find sID and sName of student whose sName has string length greater
than 3.
Select sid , sname from student where length ( sname ) > 3 ;
9 . Find floor, ceiling and truncate (to one decimal place) value of average
GPA.
Select FLOOR ( avg ( gpa )) ,ceil ( avg ( gpa )) ,TRUNCATE ( avg ( gpa
) ,1 ) from student ;
13.Consider String ‘Satya Nadella’ replace this using the key (Hint: use
translate) (a d e l N S t y) -> (1 2 3 4 5 6 7 8)
Select TRANSLATE ( 'Satya Nadella' , 'adelNSty' , '12345678' ) from dual ;
14.Display sID, sname and DoB in this format ‘February 26, 2014’.
Select sid , sname , to_char ( dob , 'Monthdd,yyyy' ) from student ;