create user clover identified by 12345; create tablespace clover_tablespace datafile 'E:\Oracle_11g\app\Clover\oradata\orcl\clover_local.dbf' size 1000M autoextend on next 100M; create temporary tablespace clover_space tempfile 'E:\Oracle_11g\app\Clover\oradata\orcl\clover_temp.dbf' size 50M autoextend ON next 10M maxsize 100M; alter user clover default tablespace clover_tablespace temporary tablespace clover_space; grant connect,RESOURCE,dba to clover;
///////////////////////////////////////导入dmp文件//////////////////////////////////////////////
create tablespace PARAM_JZZ datafile 'E:\Oracle_11g\app\Clover\oradata\orcl\PARAM_JZZ.DBF' size 300M autoextend on next 50m maxsize unlimited extent management local; create user PARAM_JZZ identified by PARAM_JZZ default tablespace PARAM_JZZ temporary tablespace temp; grant connect ,dba,resource to PARAM_JZZ; drop user PARAM_JZZ cascade; DROP TABLESPACE PARAM_JZZ INCLUDING CONTENTS AND DATAFILES; imp PARAM_JZZ/PARAM_JZZ@orcl file='C:\Users\Clover\Desktop\jzz\prcd_jzz.dmp' log=C:\Users\Clover\Desktop\jzz\prcd_jzz.log full=y ignore=y
/////////////////////////////////////////////////////////设置主键自增/////////////////////////////////////////////
--创建表 CREATE TABLE fruit ( id NUMBER(11) NOT NULL primary key, name VARCHAR2(20) ); --创建自增序列 CREATE SEQUENCE SYS_FRUIT_SEQ MINVALUE 1 NOMAXVALUE INCREMENT BY 1 START WITH 1 NOCACHE; --数据插入 INSERT INTO fruit(id,name) VALUES (SYS_FRUIT_SEQ.NEXTVAL,'苹果'); INSERT INTO fruit(id,name) VALUES (SYS_FRUIT_SEQ.NEXTVAL,'香蕉'); --删除序列 DROP SEQUENCE SYS_FRUIT_SEQ;
O(∩_∩)O开心就好O(∩_∩)O