开发者

Sybase openqueries?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜