【文件属性】:
文件名称:Oracle常用的命令如何查看表的结构
文件大小:33KB
文件格式:DOC
更新时间:2014-10-14 04:03:14
oracle
Oracle常用的命令如何查看表的结构
EDITDATA 表名;
修改表字段:
Alter table 表名 modify(字段名 类型 约束);
1 alter table test modify (addd varchar2(10) null);
alter table 表名 add(字段名 类型 约束);
2 alter table test add(age varchar2(5));
1.登陆系统用户
在Oracle常用命令中查看表结构sqlplus 然后输入系统用户名和密码
2.创建表空间登陆别的用户
conn 用户名/密码;
3 create tablespace 空间名
4 datafile 'c:\空间名' size 15M --表空间的存放路径,初始值为15M
5 autoExtend on next 10M --空间的自动增长的值是10M
6 permanent online; --永久使用
3.创建用户
7 create user shi --创建用户名为shi
8 identified by scj --创建密码为scj
9 default tablespace 表空间名 --默认表空间名
10 temporary tablespace temp --临时表空间为temp
11 profile default --受profile文件的限制
12 quota unlimited on 表空间名; --在表空间下面建表不受限制
4.创建角色
create role 角色名 identified by 密码;
5.给角色授权
grant create session to 角色名;--给角色授予创建会话的权限
grant 角色名 to 用户名; --把角色授予用户