oracle基础知识1

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;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值