本月博客排行
-
第1名
青否云后端云 -
第2名
e_e -
第3名
vipbooks - silverend
- lemonhandsome
- ajinn
- jveqi
- kingwell.leng
年度博客排行
-
第1名
青否云后端云 -
第2名
zw7534313 -
第3名
大家都说我很棒 - liyihz2008
- wy_19921005
- gengyun12
- hbxflihua
- e_e
- luxurioust
- dbagirl
- zysnba
- Alsmile
- robotmen
- gaozzsoft
- jywhltj
- cpongo1
- leslie26
- qepwqnp
- zhangdaiscott
- 解宜然
- cuityang
- sichunli_030
- gashero
- fantaxy025025
- ranbuijj
- gdpglc
- ssydxa219
- wallimn
- vipbooks
- 淡看人生
- hanbaohong
- jickcai
- javashop
- johnsmith9th
- appalese
- gaojingsong
- weiyides
- zhangyi0618
- java-007
- AVI
- laiyangdeli
- lyongq04
- xpenxpen
- liunancun
- 龙哥IT
- conkeyn
- nychen2000
- lyndon.lin
- panshunchang
- ouanui
最新文章列表
Oracle 约束条件
1)Not Null 约束 (防止NULL值进入指定的列)
不能包含Null值或者无值
只能在单个列上定义
同一个表中可以在多个列上分别定义NOT NULL约束
2)UNIQUE 约束 (唯一约束,保证指定的各列组合中没有重复的值)
不能包含重复的值,可以包含多个NULL值或者无值
可以定义在单个列上或者多个列的组合
Oracle会自动为UNIQUE约束的列建立一个唯一索引。如 ...
将null字段修改为not null
先使字段col为空的都填上默认值 ‘0’:
update yourtable set col=0 where col is null
然后再col字段上加not null约束:
alter table yourtable modify column_name datatype not null;