set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go ALTER procedure [dbo].[proc_GetStoreBoxProductsForOther] @userid int as begin select storeid,shopid,shopname,canusetimes,unit,shopprice,isattach, istime,displaypic,flashdir,iwidth,iheight,iszorz,typeid,displaymode, userid,operation,oriposition,cemeteryid,displayout,isvipbuy from view_storeandstorezheuangzhi where userid=@userid and usingout=0 and parentid<=0 and ((heavenid in (select [cemeterysid] from [cemeterys] where [userid]=@userid)) or (heavenid='-1' or heavenid='')) end view_storeandstorezheuangzhi --为视图