首页/ 题库 / [问答题]存储过程

1)请创建一存的答案

存储过程

1)请创建一存储过程 getDetailByName,通过输入参数学生姓名(如“章山"),在“学生”表中查询该学生的基本信息。若“姓名”列不存在此姓名,用SELECT输出信息“不存在此学生”。
2)写出调用此存储过程的语句,查询“李四”的基本信息。

问答题
2021-07-19 08:05
查看答案

正确答案

1)(10分)参考答案不唯一,下面列出两种

Create procedure getDetailByName

@name nvarchar(10)

AS

IF exists(SELECT * FROM 学生 Where姓名= @Name)

SELECT * FROM 学生 Where姓名= @Name

ELSE

SELECT \'不存在此学生\'

 

参考答案2

Create procedure getDetailByName


试题解析

1)(10分)参考答案不唯一,下面列出两种

Create procedure getDetailByName

@name nvarchar(10)

AS

IF exists(SELECT * FROM 学生 Where姓名= @Name)

SELECT * FROM 学生 Where姓名= @Name

ELSE

SELECT \'不存在此学生\'

 

参考答案2

Create procedure getDetailByName


相关题目
boost的意思是:help or encourage to increase or improve
eloquent的意思是:fluent or persuasive in speaking or writing

A campus emergency ______ occur at any time of the day or night, weekend, or holiday, with little or no warning.

A cabinet or space containing the controls or valves for the fixed firefighting system must be().
1_____education is the instruction that occurs when the instructor and students are separated by distance or time,or both
在应用ORS液的过程中,错误的做法是()
在应用ORS液的过程中,错误的作法是()
在应用ORS液的过程中,错误的是()
Mainly east 3 or 4 partly cloudy to overcast occasional rain()slowly south moderate or good.
()any case or suspected case of quarantinable disease,or any case of eruptive disease or any death be discovered,the local quarantine officer must be notified immediately.
Should any case or suspected case of quarantinable disease,or any case of eruptive disease or any death be discovered,the local Quarantine Officer must be()immediately.
已知A=40;B=30;C=100;D=50,逻辑“与”运算符为and,“或”运算符为or,“非”运算符为not。计算表达式(A>B+20)or(B+60<>
Masters are()solely responsible for all damages or accidents of whatever kind resulting from the navigating or handling of their vessels by day or by night.
If he is a common carrier,he is absolutely responsible to the owner of the goods carried ()any loss or damage to them unless caused by an Act of God or the Queen’s enemies,or the inherent vice in the goods themselves,or the negligence of the owner of the goods,or a general average sacrifice.
系统中雷达状态包括Unknown、Operational(or ON)、Failed(or OFF)、Detached。
Owners are to be responsible for loss of or damage to the goods or delay in delivery of the goods only in case the loss,damage or delay has been caused by the improper or negligent stowage of the goods.This means that().
The carrier is liable for loss of or damage to the goods or delay in delivery caused by fire,()the claimant proves that the fire arose from fault or neglect on the part of the carrier,his servants or agents.
Shutdown price(or point,or rule) 停业价格(或停业点、停业原则)
翻译:With Average or With Particular Average(WA or WPA)()
()shall be liable for loss of and damage to the Vessel and/or goods arising or resulting from inaccuracies in stating the description,quantity,weight,measurement or contents.
广告位招租WX:84302438

免费的网站请分享给朋友吧