ORACE commonly used SQL
1. Create and delete users
create user tkzj_data identified by 123456 default tablespace data;
drop user tkzj_data cascade;
2. Change the password
ALTER user username identified by 123456
3. Assign roles
grant resource, connect,create view to username;
--Create serial authorization
grant connect,resource,create any view,create any synonym,create database link to tkzj_data;
grant dba to tkzj_data ;--authorize dba permissions
revoke dba from username;--Revoke dba permissions
revoke resource, connect,create view from username;
4. Unlock users
alter user username account unlock;
4. Hierarchical query
4.1 Query all leaf nodes according to the root node
4.2 Query all root nodes according to leaf nodes
4.3 Query all descendant nodes according to the node
5. The use of advanced sql statement exists
6. Data synchronization statement minus
7. Import/Export database
imp tkzj_user/123456@orcl file=e:\tkzj.dmp full=y;
exp tkzj_data2/123456@orcl file=e:\tkzj2.dmp full=y;
8. Create a tablespace
create tablespace DATA datafile 'C:\personal\oracle\product\11.2.0\ORADATA\ORCL\DATA01.DBF' size 1024m;