FirebirdSQL / firebird

Firebird server, client and tools
https://www.firebirdsql.org/
1.26k stars 216 forks source link

Extend ALTER SEQUENCE syntax with SELECT [CORE5621] #5887

Open firebird-automations opened 7 years ago

firebird-automations commented 7 years ago

Submitted by: Tommi Prami (mwaltari)

ALTER SEQUENCE <name> RESTART WITH (SELECT MAX(ID) FROM CUSTOMER);

Sometimes the select is not that start forward, but anyways would do good to be able to fetch new value with select,

Would make easier to reset the Sequences in some scenarios like when you have to enter data to db by hand etc (Like in development phase) or when there is an bug in software.

firebird-automations commented 7 years ago

Commented by: Sean Leyne (seanleyne)

An EXECUTE BLOCK with EXECUTE STATEMENT could be used to accomplish the same thing, so the need for this change is nominal.