1.启用用户:alter user username account unlock;
2.查看用户: show user (用户数据字典:dba_users/user_users)
3.设置用户默认或临时表空间:alter user scott default|temporary tablespace tablespace_name;( 表空间字典:dba_tablespaces/user_tablespaces)
4.创建表空间:create tablespace test_ts datafile 'ts.dbf' size 10m;(表空间名字dba_data_files/dba_temp_files)
5.修改表空间可用状态:alter tablespace test_ts online|offline;
6.修改表空间读写状态:alter tablespace test_ts read only|read write;
7.1添加表空间数据文件:alter tablespace test_ts add datafile 'ts.dbf' size 10m;
7.2删除表空间数据文件:alter tablespace test_ts drop datafile 'ts.dbf';
8.删除表空间(是否一并删除其中数据文件):drop tablespace test_ts [including contents]
9.向表中添加字段:alter table userinfo add username varchar2(20);
10.更改表中字段类型:alter table userinfo modify username varchar2(20);
11.删除字段:alter table userinfo drop column username;
12.修改表中字段名字:alter table userinfo rename column email to new_email;
13.修改表名:rename userinfo to new_userinfo;
14.1删除表之截断:truncate table userinfo;
14.1删除表之删除:drop table userinfo;