0% found this document useful (0 votes)
10 views2 pages

SQL 21C Post-Installation Queries

Uploaded by

suryanshgiri28
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

SQL 21C Post-Installation Queries

Uploaded by

suryanshgiri28
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

QUERY NO.

1 :-

alter session set "_ORACLE_SCRIPT" = true;

QUERY NO. 2 :-

create user scott identified by root;

QUERY NO. 3 :-

grant create session, create table, unlimited tablespace to scott;

QUERY NO 4:-

create user smith identified by root;

QUERY NO 5:-

grant create session to smith;

QUERY NO. 6 :-

conn scott

QUERY NO. 7 :-

create table dept


(deptno number(2) primary key,
dname varchar2(14),
loc varchar2(13));

QUERY NO. 8 :-

insert all
into dept values (10,'ACCOUNTING','NEW YORK')
into dept values (20,'RESEARCH','DALLAS')
into dept values (30,'SALES','CHICAGO')
into dept values (40,'OPERATIONS','BOSTON')
select 1
from dual;

QUERY NO. 9 :-

create table emp


(empno number(4) primary key,
ename varchar2(10),
job varchar2(9),
mgr number(4),
hiredate date,
sal number(7,2),
comm number(7,2),
deptno references dept(deptno));

QUERY NO. 10 :-

insert all
into emp values
(7369,'SMITH','CLERK',7902,'17-DEC-80',800,NULL,20)
into emp values
(7499,'ALLEN','SALESMAN',7698,'20-FEB-81',1600,300,30)
into emp values
(7521,'WARD','SALESMAN',7698,'22-FEB-81',1250,500,30)
into emp values
(7566,'JONES','MANAGER',7839,'02-APR-81',2975,NULL,20)
into emp values
(7654,'MARTIN','SALESMAN',7698,'28-SEP-81',1250,1400,30)
into emp values
(7698,'BLAKE','MANAGER',7839,'01-MAY-81',2850,NULL,30)
into emp values
(7782,'CLARK','MANAGER',7839,'09-JUN-81',2450,NULL,10)
into emp values
(7788,'SCOTT','ANALYST',7566,'19-APR-87',3000,NULL,20)
into emp values
(7839,'KING','PRESIDENT',NULL,'17-NOV-81',5000,NULL,10)
into emp values
(7844,'TURNER','SALESMAN',7698,'08-SEP-81',1500,0,30)
into emp values
(7876,'ADAMS','CLERK',7788,'23-MAY-87',1100,NULL,20)
into emp values
(7900,'JAMES','CLERK',7698,'03-DEC-81',950,NULL,30)
into emp values
(7902,'FORD','ANALYST',7566,'03-DEC-81',3000,NULL,20)
into emp values
(7934,'MILLER','CLERK',7782,'23-JAN-82',1300,NULL,10)
select 1
from dual;

QUERY NO 11:-

commit;

You might also like