Chinaunix首页 | 论坛 | 博客
  • 博客访问: 771722
  • 博文数量: 185
  • 博客积分: 7434
  • 博客等级: 少将
  • 技术积分: 2325
  • 用 户 组: 普通用户
  • 注册时间: 2005-12-29 14:01
文章分类

全部博文(185)

文章存档

2013年(1)

2012年(2)

2011年(17)

2010年(25)

2009年(36)

2008年(104)

分类: Oracle

2008-09-22 15:39:33

在以前的版本,在表中增加字段有时风险比较高,特别是访问频繁的时候,在增加字段且增加的字段要求不为空并带有缺省值的时候,很有可能导致应用故障.在11g里,通过数据字典的方式记录不为空字段的缺少值,这样就不像以前版本中,给一个已经有较多记录的表增加一个not null&with default value字段时需要很长时间,Oracle的有功能增强还是比较实用的.
 
Oracle 11g的文档中描述如下:
Enhanced ADD COLUMN Functionality
Default values of columns are maintained in the data dictionary for columns specified as NOT NULL.
Adding new columns with DEFAULT values and NOT NULL constraint no longer requires the default value to be stored in all existing records. This not only enables a schema modification in sub-seconds and independent of the existing data volume, it also consumes no space.
阅读(1297) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~