Ex. No. 4 Views, Locks and Partitions: To Create A Table Emp01
Ex. No. 4 Views, Locks and Partitions: To Create A Table Emp01
H 10MCA01
Ex. No. 4
VIEWS, LOCKS AND PARTITIONS
AIM:
To create views, locks and partitions from the table.
1. VIEWS:
Table created.
1 row created.
1 row created.
ABDULLAH. H 10MCA01
1 row created.
1 row created.
1 row created.
Table created.
1 row created.
SQL> /
Enter value for rollno : 103
Enter value for name : Arun
Enter value for total : 460
Enter value for grade :A
old 1: insert into student01 values(&rollno,'&name',&total,'&grade')
new 1: insert into student01 values(103,'Arun',460,'A')
1 row created.
SQL> /
Enter value for rollno : 104
Enter value for name : Jana
Enter value for total : 420
Enter value for grade :B
old 1: insert into student01 values(&rollno,'&name',&total,'&grade')
new 1: insert into student01 values(104,'Jana',420,'B')
1 row created.
ABDULLAH. H 10MCA01
1 row created.
SQL> /
Enter value for rollno : 101
Enter value for name : Vishnu
Enter value for total : 400
Enter value for grade :B
old 1: insert into student01 values(&rollno,'&name',&total,'&grade')
new 1: insert into student01 values(101,'Vishnu',400,'B')
1 row created.
To create the view named v01 to display the records whose total greater than 400 in
the table student01 :
SQL>Create view v01 as(select * from student01 where total>400);
View created.
To create the view named view01 to display the records whose salary is 12000:
SQL>Create view view01 as(select * from emp01 where salary=12000);
View created.