Sign-up....

有人知道INTERBASE的动态SQL怎么用?

例:将动态语句 "select sum(col1) from goods where ...."

执行的结果放在一个变量 var_1 中

[73 byte] By [游牧人] at [2007-9-19 0:25:20]
# 1 Re: 有人知道INTERBASE的动态SQL怎么用?
select sum(col1) as val_1 from goods where ....
啸傲江湖曲 at 2007-1-31 9:17:2 >
# 2 Re: 有人知道INTERBASE的动态SQL怎么用?
使用存储过程可以吗?

create procedure myprocedurename

returns(MyReturnValue numeric(15,2))

as

begin

select sum(col1) from goods where...

into :MyReturnValue;

end

调用时直接调用即可了,如:

select * from MyprocedureName

返回单行单个字段的求和值。

牛奶2能量 at 2007-1-31 9:17:7 >

其他数据库开发

All Classified