You are on page 1of 1

create table k22stu(roll_no int, name varchar(20), location varchar(30));

insert into k22stu values(1,'A','Russia');


insert into k22stu values(2,'B','Russia');
insert into k22stu values(3,'A','Pakistan');
insert into k22stu values(4,'D','India');
insert into k22stu values(5,'E','England');
select * from k22stu;
select DISTINCT(location) from k22stu;
select count(*) from k22stu;
select count(name) from k22stu;
select count(distinct name) from k22stu;
select location as address from k22stu;
select * from k22stu;
select * from k22stu where roll_no IN (1,2,3);
select * from k22stu;
commit;
insert into k22stu values(6,'F','England');
savepoint A;
select * from k22stu;
insert into k22stu values(7,'G','England');
select * from k22stu;
rollback to A;
select * from k22stu;

You might also like