问题:如题````
具体介绍:
 存储过程A:接收多个参数``并插入表aa中```
  存储过程B:接收一个参数```执行并从表bb中读取数据X,返回给存储过程A``X作为存储过程A的某个参数`````小弟不知道这个该怎么实现```希望各位大侠讲解下```
这个问题有点像函数的调用问题一样``````谢谢了``

解决方案 »

  1.   

    create proc a
    @x int,
    @y int
    as
    insert into aa values()create proc b
    @z
    as
    declare @x int
    declare @y int
    select @x=x,@y=y from bb where z=@z
    exec(a) @x,@y
      

  2.   

    注意参数传递!!!
    用web Matrix 可以生成很多代码的!推荐!
    想要的话发邮件给我[email protected]
      

  3.   

    直接使用 exec 调用存储过程create proc usp_A
    @x int,
    @y int
    as
    insert into aa values()create proc usp_B
    @z
    as
    declare @x int
    declare @y int
    select @x=x,@y=y from bb where z=@zexec(usp_A) @x,@y