ALTER Procedure [dbo].[fs2_video_order_query_random_by_userId] ( @user_id varchar(50) --用户名 ) AS BEGIN SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED BEGIN TRANSACTION --事务开始 --查询有没有审核的视频工单 if(EXISTS(select auto_no from fs2_user_video where user_id= @user_id and user_video_status=0)) begin select fs2_video_order.auto_no ,fs2_video_order.work_no ,fs2_video_order.create_userId from fs2_video_order WITH(NOLOCK) end COMMIT TRANSACTION --事务提交 SET NOCOUNT OFF END
求高人指点一下啊
没看明白你这个存储过程时要干嘛~~
如果存在,就查询???