REdtable

an anonymous user · July 22, 2021 · SQL
create table dept
(deptno number(2,0),dname varchar2(15),loc varchar2(30),constraint pk_dept primary key(deptno));
create table emp(
eno number(4,0),ename varchar2(10),job varchar2(9),deptno number(2,0),constraint pk_emp primary key(eno),constraint fk_emp foreign key(deptno)references dept(deptno));
insert into dept(deptno,dname,loc) values('5','uma','hyd');
commit;
insert into dept values('6','devi','rjy');
insert into dept values('7','ravi','vzy');
rollback;
select * from dept;

Comments

Please sign up or log in to contribute to the discussion.