Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5725533
  • 博文数量: 745
  • 博客积分: 10075
  • 博客等级: 上将
  • 技术积分: 7716
  • 用 户 组: 普通用户
  • 注册时间: 2005-04-29 12:09
文章分类

全部博文(745)

文章存档

2019年(1)

2016年(1)

2010年(31)

2009年(88)

2008年(129)

2007年(155)

2006年(197)

2005年(143)

分类: Oracle

2007-01-16 11:18:44

Rules for Using NEXTVAL and CURRVAL
You can use NEXTVAL and CURRVAL in the following contexts:
 The SELECT list of a SELECT statement that is not part of a subquery
 The SELECT list of a subquery in an INSERT statement
 The VALUES clause of an INSERT statement
 The SET clause of an UPDATE statement
You cannot use NEXTVAL and CURRVAL in the following contexts:
 The SELECT list of a view
 A SELECT statement with the DISTINCT keyword
 A SELECT statement with GROUP BY, HAVING or ORDER BY clauses
 A subquery in a SELECT, DELETE or UPDATE statement
 The DEFAULT expression in a CREATE TABLE or ALTER TABLE statement
 
Types of indexes
 Two types of indexes can be created. One type is a unique index: the Oracle Server automatically creates this index when you define a column in a table to have a PRIMARY KEY or a UNIQUE key constraint. The name of the index is the name given to the constraint.
 The other type of index is a nonunique index, which a user can create. For example, you can create a FOREIGN KEY column index for a join in a query to improve retrieval speed
阅读(2237) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~