oracle经验记录
1、添加新User时必须要增加的角色权限:connect、dba、resource
2、添加表空间的语句
create tablespace DEMOSPACE datafile 'D:/test.dbf' size 1500M autoextend on next 5M maxsize 3000M;
3、删除表空间
drop tablespace DEMOSPACE including contents and datafiles;
4、创建触发器实现自增
CREATE OR REPLACE TRIGGER sys_user_INS_TRG BEFORE INSERT ON sys_user FOR EACH ROW WHEN(NEW.ID IS NULL) BEGIN SELECT SYS_USER_ID.NEXTVAL INTO :NEW.ID FROM DUAL;