4

oracle 表名,列名

1.字母开头

2.长度<=30

3.不能使用oracle保留字

4.用A-Z,a-z,0-9,#,$等

字符型:

char 定长 max2000字符

char(10),'cha',前3个字符放cha,后添加7个空格补全,可以提高查询速度

varchar2(?) 变长 最大4000字符

varchar(10),'cha‘,oracle分配3个字符,可以节省空间

clob (character large object) 字符型大对象,max4G

数字类型:

number 范围 -10(38)-10(38)方,整数小数都可以

number(5,2) 表示一个小数有五位有效数,2位小数 范围 -999.99-999.99

number(5) 表示一个5位整数 -99999-99999

日期类型:

date 包含年月日,时分秒

timestamp oracle9i对date的扩展, 高精度

图片类型:

blob 2进制数据 图片/声音 4G 

修改表:

alter table student add (classid number(2));

alter table student modify(xm varchar2(10));

alter table student mofify(xm char(30));//修改字段类型,名字不能有数据

alter table student drop column sal;

rename student to students;

drop table student;

desc student;