SELECT @JS_ID = A.ID,
@JSHM = A.JSHM,
@JS_MC = A.JS_MC,
@XY_DM = A.XY_DM,
@RS = A.RS
FROM(select ID,JSHM,JS_MC,XY_DM,RS
FROM F_Get_ZYBJ_JXB_JSXX(@ID_ZYBJ_KKKC_JXB,@ID_1,@XND_Q,@XND_Z,@XNXQ)
where JSLX_DM = @JSLX_DM
and DXBZ >= @BJSL)AS A
WHERE A.ID NOT IN(dbo.aa(@i,@num,@PK_JS_JG_Array))
之前没有写 “AS A” 报错,而在where语句中若要用到子查询则不需启别名。
转载于:https://www.cnblogs.com/oY211/archive/2011/06/07/2074234.html