开发者

Sybase openqueries?

开发者 https://www.devze.com 2022-12-10 01:46 出处:网络
Does open query exist in sybase ? Or more generally, in sybase, what are the possible way to select among the result of a procedure (tempor开发者_开发技巧ary tables, out params, others ??)You can spec

Does open query exist in sybase ? Or more generally, in sybase, what are the possible way to select among the result of a procedure (tempor开发者_开发技巧ary tables, out params, others ??)


You can specify output parameters for a stored procedure by adding the keyword "output" after the parameter in the "Create Procedure MyStoredProcedure..." command.

Temp Tables of course exist, local or Global.

T-SQL under Sybase IQ you can also select from a stored procedure so something like this, assume your procedure is called "MyStoredProcedure"

SELECT MyId
FROM MyStoredProcedure()

Finally you can also create derived tables (at least it works in Sybase IQ) like this to join with your stored procedure results

SELECT t1.Name, t1.Address, t2.MyId
FROM MyTable t1, (SELECT MyId FROM MyStoredProcedure()) t2
WHERE t1.MyId = t2.MyId
0

精彩评论

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