--清除垃圾信息
- PURGE recyclebin;
--查詢垃圾信息
- SELECT t.object_name,t.type ,t.original_name FROM user_recyclebin t;
--刪除表
- drop table example;
--徹底刪除表不進入Recycle
- drop table example purge;
--創建表
- CREATE TABLE admin(
- id VARCHAR(40) NOT NULL PRIMARY KEY,
- user_name VARCHAR(255),
- user_passwd VARCHAR(255),
- user_level VARCHAR(50)
- );
--查詢表
- select a.id,a.user_name,a.user_passwd,a.user_level from admin a;
--創建空間
- create tablespace shop datafile '/u01/app/oracle/oradata/shop/shop.dbf' size 50M default storage (initial 500K Next 500K minextents 1 maxextents unlimited pctincrease 0);
--Oracle創建用戶權限
--創建用戶
- create user shopname identified by shoppasswd default tablespace shop;
--授權
- grant resource,connect,dba to shopname;
--刪除表空間
- drop tablespace shop including contents and datafiles;
--刪除用戶
- drop user shopname cascade
--查詢所有用戶
- select username from dba_users;
--授予DBA權限
- grant dba to shopname;
--授予不限制的表空間
- grant unlimited tablespace to shopname;
--授予查詢任何表
- grant select any table to shopname;
--授予 查詢 任何字典
- grant select any dictionary to shopname;