Firebird 跨数据库访问

ALTER PROCEDURE EX_FILE ()
    RETURNS ("ID" BIGINT, 
        "NAME" VARCHAR(100) CHARACTER SET UTF8)
AS
BEGIN
  FOR EXECUTE STATEMENT 
    ('SELECT FIRST 500 ID ,FILE_NAME FROM FILE_ WHERE ID < ? AND FILE_NAME LIKE ? ORDER BY ID DESC')
    (10, '%书')
    ON EXTERNAL DATA SOURCE 'localhost:test' AS USER 'sysdba' PASSWORD '123456' --WITH AUTONOMOUS TRANSACTION
  INTO :ID, :NAME DO
  BEGIN
    SUSPEND;
  END
END

 

posted on 2019-12-31 10:55  jonney_wang  阅读(453)  评论(6编辑  收藏  举报

导航