这句的时候负值
select fa , fb ,@parm = fc from tableA  where id=@id

解决方案 »

  1.   

    select fa , fb ,@parm = fc from tableA  where id=@id
      

  2.   

    确保select fa , fb ,@parm = fc from tableA  where id=@id 返回唯一记录的时候是可行的!
      

  3.   

    declare @cloth_isInRetail        int ,
            @suitCloth_id            int        
     
    select suit_id ,
           @suitCloth_id = cloth_id ,
           suit_size ,
           suit_img ,
           suit_desc ,
           suit_price ,
           @cloth_isInRetail = cloth_isInRetail
    from            
           FZ_MakeSuit
    where      
           suit_id = ( select suit_id from FZ_MakeSuitOrderMap where order_id = 6)     
             谢谢各位的回复!  不过我按照各位的指导,写成上面那样,系统就有错误提示:
    服务器: 消息 141,级别 15,状态 1,行 14
    向变量赋值的 SELECT 语句不能与数据检索操作结合使用。
    为什么不可以呢?他为什么说这两个不能结合使用?我的语句又有什么问题呢??
      

  4.   

    你那个SELECT 中不可以同时有赋值又有结果哦``` @suitCloth_id = cloth_id ,
           suit_size , 这样不可以的```
      

  5.   

    赋值和检索不能在同一个select操作中同时存在