Firebird multiple statements

2019-06-21 23:35发布

is there any way to execute multiple statements (none of which will have to return anything) on Firebird? Like importing a SQL file and executing it.

I've been looking for a while and couldn't find anything for this.

5条回答
贼婆χ
2楼-- · 2019-06-22 00:11

Execute statement is exactly for that purpose. Works in IBExpert too, a simple example :

execute block as
begin
  Update stuff; 
  Delete stuff; 
  Update stuff;
end

Comprehensive guide, with temporary variables and cycles into it : http://www.firebirdsql.org/refdocs/langrefupd15-psql-execstat.html

查看更多
祖国的老花朵
3楼-- · 2019-06-22 00:15

You can do it from IBExpert with Script Executive (Menú Tools -> Script Executive). Be sure to connect to the DB you want to run the query's and then at the Script Executive dialog check the "Use current connection" for this to work.

查看更多
孤傲高冷的网名
4楼-- · 2019-06-22 00:19

Shouldn't the normal query-delimiter work? Like:

Update stuff; Delete stuff; Update stuff;
查看更多
我命由我不由天
5楼-- · 2019-06-22 00:24

You can do this with IBOConsole (download from www.mengoni.it). The SQL window allows you to enter a complete script with the usual ";" delimiter.

查看更多
走好不送
6楼-- · 2019-06-22 00:31

In IBExpert you can execute multiple commands in single script via Tools->Script Executive (Ctrl+F12)

查看更多
登录 后发表回答