Chinaunix首页 | 论坛 | 博客
  • 博客访问: 86233
  • 博文数量: 31
  • 博客积分: 2010
  • 博客等级: 大尉
  • 技术积分: 370
  • 用 户 组: 普通用户
  • 注册时间: 2008-06-26 13:33
文章分类

全部博文(31)

文章存档

2009年(5)

2008年(26)

我的朋友

分类: Oracle

2008-08-28 13:52:15

数据类型

Varchar2(size)           可变字符数据

Char(size)                 固定长度字符数据

Number(p,s)              数值型

Date                         日期时间型

Long                       可变长度的字符型,最大2G

Clog                    单字节的大型字符对象,最大4G

Raw and long raw            二进制型

Blog                         二进制大型对象,最大可达4G

Bfile                          二进制数据,在数据外部存储文件,最大4G

 

 

alter table student add( stuPhone varchar(18));    // student表中插入字段

 

alter table student modify ( stuname varchar(12));   //修改表中的字段

 

alter table student set unused column stuXX;      //sutduent表中的stuXX设置为无用状态,此时将在查询时看不到此字段了

 

alter table student drop unused columns;   //删除表中无用的字段

 

alter table student add constraint pk_stuno primary key(stuno);  //设置表中约束

 

alter table student drop constraint pk_stuno;   //清除表中约束

 

desc user_constraints;    //查看表中字段

阅读(600) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~