开发者

How to modify a generator value

I want to modify a generator value in Delphi with Firebird 2.5. The Statement is: ALTER SEQUENCE GEN_NAME RESTART WITH value . What I want is that the value not to be a number but a variable or a parameter like: ALTER SEQUENCE GEN_TELAGENT_ID RESTART WITH val; where val get a different integer value I don't know yet.

开发者_Python百科

I hope I made myself understood. Sorry for my not so good English. Thanks for the answers.


use a parameter, with your preferred components it should work.

myQuery.SQL.Text := 'alter sequence gen_telagent_id restart with :val';
myQuery.Params.ParamByName('val').AsInteger := val;
myQuery.ExecSQL();

Actual syntaxis may vary depending on the components you use to connect to Firebird.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜