创建存储过程prcgetprice,通过输入图书编号,使用输出参数返回图书价格,根据题目完成以下代码的填空。create proc prcgetprice@BookID varchar(50),@Price float OUTPUT asbegin try if exists(select * from BookInfo where BookID=@BookID) begin declare @Price float SET @Price=0 select @Price =Price from BookInfo where BookID=@BookIDend trybegin catch print 'error'end catch执行prcgetprice存储过程查询图书编号为B001图书的价格,填充语句。declare @Price floatexec prcgetprice 'B001',@Price ___print @Price
举一反三
- 【单选题】统计图书信息表中每个出版社图书的平均价格。能得到正确结果的SELECT语句是 A: A、select pubname,AVG(price) from bookinfo order by puname B: select pubname,AVG(price) from bookinfo group by pubname C: select pubname,price from bookinfo D: select pubname,AVG(price) from bookinfo
- 【单选题】显示图书信息表中不同书架图书的平均价格大于50元的书架号和平均价格。能得到正确结果的SELECT语句是 A: select casename,AVG(price) <br> from bookinfo group by casename where AVG(price)>50 B: select casename,AVG(price)>50 from bookinfo group by casename C: select casename,AVG(price) <br> from bookinfo<br> having AVG(price)>50 group by casename D: select casename,AVG(price) <br> from bookinfo group by casename<br> having AVG(price)>50
- 以下____完整,语句的作用是:查询book表中图书价格大于图书均价的图书信息select * from book where _____>;(select avg(price) from Book )
- 以下语句的作用是:查询book表中图书价格大于图书均价的图书信息 select * from book where _____>( select avg(price) from Book ) 则____处的内容为,
- 以下语句的作用是:查询book表中图书价格大于图书均价的图书信息select * from book where _____>(select avg(price) from Book )则____处的内容为,