求oracle scott用户下的表
发布网友
发布时间:2022-04-07 21:03
我来回答
共3个回答
热心网友
时间:2022-04-07 22:32
scott用户下只有四张表
下面是建表语句
-- Create table
create table SCOTT.SALGRADE
(
grade NUMBER,
losal NUMBER,
hisal NUMBER
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create table
create table SCOTT.EMP
(
empno NUMBER(4) not null,
ename VARCHAR2(10),
job VARCHAR2(9),
mgr NUMBER(4),
hiredate DATE,
sal NUMBER(7,2),
comm NUMBER(7,2),
deptno NUMBER(2)
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create/Recreate primary, unique and foreign key constraints
alter table SCOTT.EMP
add constraint PK_EMP primary key (EMPNO)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table SCOTT.EMP
add constraint FK_DEPTNO foreign key (DEPTNO)
references SCOTT.DEPT (DEPTNO);
-- Create table
create table SCOTT.DEPT
(
deptno NUMBER(2) not null,
dname VARCHAR2(14),
loc VARCHAR2(13)
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create/Recreate primary, unique and foreign key constraints
alter table SCOTT.DEPT
add constraint PK_DEPT primary key (DEPTNO)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create table
create table SCOTT.BONUS
(
ename VARCHAR2(10),
job VARCHAR2(9),
sal NUMBER,
comm NUMBER
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
热心网友
时间:2022-04-07 23:50
发你oracle带的创建语句
路径:E:\oracle\proct\10.2.0\db_1\RDBMS\ADMIN\scott.sql
以sysdba登录后执行就可以了
热心网友
时间:2022-04-08 01:25
rdbms/utlsampl.sql
这个文件里面有.