Lab Assignment
Lab Assignment
2.Create a user of your name & assign it a password. 3.Grant resource ,connect to a new user. 4.Disconnect from Oracle. 5.Connect as a new user. 6.See list of tables by usingTab / user_tables /cat tables. 7.View the user name from dual. 8.Clear the screen. 9.Perform some mathematical operations by using dual.(Addition,multiplication etc) 10.Create a table student with following attributes: Roll_No Name City Pincode Age number varchar varchar varchar number 6 15 12 8 2
11.Display the structure of table. 12.Insert the following data into the table.
Roll_no
Name
City
Pincode Age
1 2 3 4
21 25 16 18
5 6 7 8 9 10 11
19 28 23 22 17 24 29
13.Write queries for the following outputs: Show all records. Show names of all students living in Delhi. Show record of all students whose name starts with A. Show record of all students whose name ends with it. Show records of all students having age greater than 25 & living in Dehradun. Show the names of all cities(names of cities should not be repeated). Show the names of students alphabetically in ascending order. Show the records of those students which are either less than 20 year or they are living in Bombay. Show records of all those students who are not living in Dehradun.
14.Insert the following data further into the same table. 12 NULL 14 15 Gaurav Manish Aviral NULL NULL NULL 29 25 Rampur NULL NULL Gwaliar 312125 314136 319143 313149
15.Write queries for the following: i)Assign Roll_no 13 to Manish. ii)Assign the name Abhijeet to Roll_no 15. iii)Set the cities of Roll_no.13 & 14 to Meerut. iv)Increase all age by 3 years. v)Set the age of all students living in Meerut to 25.