You can use NEXTVAL and CURRVAL in the following context:
1,The SELECT list of a SELECT statement that is not part of a subquery
2,The SELECT list of a subquery in an INSERT statement
3,The VALUES clause of an INSERT statement
4,The SET clause of an UPDATE statement
You can not use NEXTVAL and CURRVAL in the following context:
1,The SELECT list of a view
2,A SELECT statement with the DISTINCT keyword
3,A SELECT statement with GROUP BY, HAVING, or ORDER BY clauses
4,The DEFAULT expression in a CREATE TABLE or ALTER TABLE statement
阅读(2670) | 评论(0) | 转发(0) |