Kbase P3741: How to use sequences within an Insert Statement with SQL-92
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  28/01/2005 |
|
Status: Unverified
GOAL:
How to use sequences within an INSERT Statement in SQL-92
FACT(s) (Environment):
Windows NT 4.0
FACT(s) (Environment):
Progress 9.1D
FIX:
1. create the Sequence
Example: create sequence pub.mysequence)
2. when inserting a record, get the next value from the sequence and assign it into the field reserved for the Sequence in the table using the syntax pub.mysequence.nextval.
Example: insert into mytable (seq, fld) values (pub.mysequence.nextval, 'fld value')