s
--创建表空间,注意创建文件夹te108 create tablespace test108 logging datafile 'c:\te108\t108.dbf' size 10M autoextend on next 5M maxsize 20M; --创建用户及密码 create user cn profile default identified by cn default tablespace test108 temporary tablespace temp account unlock; --赋予权限 grant connect,resource,dba to cn; --创建表 drop table student; create table student( sno number primary key, sname varchar2(20), age number, sex varchar(2), birth date ) drop table course; create table course( cno number primary key, cname varchar2(20) ) drop table sc; create table sc( sno number, cno number, grade number, primary key(sno,cno) ) --克隆表 create table cn.student as select * from sys.student; create table cn.course as select * from sys.course; create table cn.sc as select * from sys.sc; --查询表 select * from sys.student; select * from sys.course; select * from sys.sc; --查询当前用户的表信息 select * from student; select * from course; select * from sc;
end
标签:cn,--,create,db,10g,course,oracle,table,select From: https://www.cnblogs.com/lindows/p/17127101.html