早教吧作业答案频道 -->其他-->
这个存储过程是什么意思setANSINULLSONsetQUOTEDIDENTIFIERONGOALTERProc[dbo].[ProcGSF](@GoodsIDbigint,@ShipWayvarchar(50))asifexists(selectShipFeefromtbShipTypewhereshipWay=@shipWayandClassID=(selectClassIDfr
题目详情
这个存储过程是什么意思set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO ALTER Proc [dbo].[Proc_GSF] ( @GoodsID bigint, @ShipWay varchar(50) ) as if exists(select ShipFee from tb_ShipType where shipWay=@shipWay and ClassID= ( select ClassID from tb_GoodsInfo where GoodsID=@GoodsID ) ) begin select ShipFee from tb_ShipType where shipWay=@shipWay and ClassID= ( select ClassID from tb_GoodsInfo where GoodsID=@GoodsID ) end else return 100
▼优质解答
答案和解析
-- ============================================== -- 前面是判断是否有符合条件的ShipFee值,后面是显示符合条件的ShipFee值 -- ============================================== if exists(select ShipFee /*判断tb_ShipType表中是否存在ShipFee这个字段*/ from tb_ShipType where shipWay=@shipWay and /* ShipFee这个字段满足条件的是:表中shipWay值等于输入的@shipWay 以及 ClassID值等于tb_GoodsInfo表中的ClassID */ ClassID= ( select ClassID from tb_GoodsInfo /*根据输入的@GoodsID从tb_GoodsInfo标红获取到的ClassID*/ where GoodsID=@GoodsID ) ) begin -----如果存在,则执行下面代码,即显示ShipFee值 select ShipFee from tb_ShipType where shipWay=@shipWay and ClassID= ( select ClassIDfrom tb_GoodsInfo where GoodsID=@GoodsID ) end else ----如果不存在,则返回值100 return 100 不懂的再call me, 从前面看,说明这个存储过程已经存在了,这是修改这个存储过程.
看了这个存储过程是什么意思setA...的网友还看了以下:
由r,t,s,n,e,o,m组成的单词有哪些(动物) 2020-04-26 …
已知字母组合成英语单词1、e e t t i n h r 2、e e r a t w h 3、o 2020-05-14 …
●考查下列文法:G(V T,V N,E,P)其中:V T={+,*,(,),i}V N={E,T,F 2020-05-25 …
将字母组成单词,并译成汉语1.m,e,r,m,u,s,汉语2.u,l,t,e,c,u,r,汉语3. 2020-06-04 …
纵横字谜之英语暑假作业题(s)(o)(r)(r)(n)(g)(r)(e))(a)(k)(k)(e) 2020-06-06 …
s,i,t,l,n,e可以组成什么单词 2020-06-09 …
已知(1+1/x)^x=e,e^x-1=x,limx→1(x+x^2+...+x^n-n)/(x-1 2020-10-31 …
谁会用下列字母组成三个英语单词???g,a,l,o,ts,t,o,a,o,ha,s,f,t,ks,h 2020-11-01 …
把给的字母中多余的一个字母丢掉,再把正确的单词拼出来(1)s,t,e,b,a,k,e(2)r,t,a 2020-12-14 …
把给的字母中多余的一个字母丢掉,再把正确的单词拼出来.(1)s,t,e,b,a,k,e(2)r,t, 2020-12-14 …