Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* https://firebirdsql.org/rlsnotesh/rnfb25-psql-exctstmnt.html */
- EXECUTE block
- RETURNS (
- VAL_A INTEGER,
- VAL_B INTEGER,
- VAL_C INTEGER
- )
- AS
- BEGIN
- -- Formato 1
- -- Variaveis nomeadas ( X, Y e Z )
- EXECUTE statement
- ('Select CAST(:X AS INT), CAST(:Y AS INT), CAST(:Z AS INT) from RDB$DATABASE')
- (X := 1, Y:=2, Z:=3)
- INTO
- :VAL_A,
- :VAL_B,
- :VAL_C;
- suspend;
- -- Formato 2
- -- Variaveis sem nome "?"
- EXECUTE statement
- ('Select CAST(? AS INT), CAST(? AS INT), CAST(? AS INT) from RDB$DATABASE')
- (1,2,3)
- INTO
- :VAL_A,
- :VAL_B,
- :VAL_C;
- suspend;
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement