Hi Will,

There my be a more elegant way to do this, but this one works.

1) Find the sequence name using the system tables like so:
SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE LOWER(TABLE_NAME) =
'tableName';
SELECT * FROM INFORMATION_SCHEMA.SEQUENCES;

2) Use the "alter sequence" command to set the value
http://www.h2database.com/html/grammar.html#alter_sequence

Cheers,
Sam Van Oort
On Jan 7, 2:32 pm, willfleury <[email protected]> wrote:
> Hi,
> Is there something similar in H2 to the statement "alter table
> tablename AUTO_INCREMENT=0" in mysql?
>
> i use the auto_inc id to represent the id for sequential report
> numbers.. If cleared, i need to reset it to zero..?
>
> Thanks,
> Will
-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.


Reply via email to