|
From: fredt <fr...@us...> - 2006-04-21 18:00:25
|
SYSTEM_SEQUENCES should not be used for getting sequence values. Use = your own tables. For example SELECT NEXT VALUE FOR login_password_SEQ FROM my_table; Sequences are designed mainly for inserting new rows, or for updating = existing rows, e.g. INSERT INTO my_table (a, b, c) VALUES (NEXT VALUE FOR = login_password_seq, 10, 'a string'); Fred ----- Original Message -----=20 From: Nitin Uchil=20 To: hsq...@li... ; = fr...@us...=20 Sent: 21 April 2006 18:31 Subject: Issue with SEQUENCE I have recently started using SEQUENCES in HSQLDB (version 1.8.0.4) CREATE SEQUENCE login_password_SEQ AS INTEGER START WITH 1 INCREMENT BY 1; When I issue: SELECT NEXT VALUE FOR login_password_SEQ FROM = INFORMATION_SCHEMA.SYSTEM_SEQUENCES It produces 46 values! The first time it creates 1 thru 46, the second = 47 thru 92...... This is true for any other SEQUENCE also. What am I doing wrong? --=20 Nitin Uchil |