实现存储过程

mssql 错误日志文件贮存地方:C:\Program Files\Microsoft SQL
Server\MSSQL\LOG 用记事本查看 @@EHuracánRO路虎极光重返叁个大背头 0为健康 sysmessages
存放的错误音讯系统表(master卡塔尔 USE master select * from sysmessages where
error=错误编号 可查询错误的来头 触发器中可用 RAISEENCORERO智跑 (50009, 16, 10State of Qatar抛出错误,此中50009正是八花九裂编号,也得以是错误音讯表达 16 10
具体的行和列可自已定 也可定义自定义的新闻 将自定义的消息增多到
sysmessages。 USE master EXEC sp_addmessage 50001, 16, N’Percentage
expects a value between 20 and 100. Please reexecute with a more
appropriate value.’,’us_english’,false,replace EXEC sp_addmessage
50001, 16, ‘工作者代码未有找到’,’简体中文’,false,replace 50001 16 必得风流洒脱致
先增添 us_english版的,再增添 ‘简体中文’ replace 意思是说,即使存在
50001 编号的音讯,就能够被新的信息替换

  1. 创立叁个名叫FindCustomer存款和储蓄进度,能够用它来寻找SQL SEKoleosVE景逸SUV中的northwind数据库的Customer表中,CustomerID为内定值(输入参数)的笔录的ContactName字段的称号,然后调用这些蕴藏进程,寻找CustomerID为’thecr’的ContactName字段值,写出创造存款和储蓄进程的SQL语句和调用的通令,以下选项哪一个是准确的。

 A

创造语句:

USE northwind

GO

CREATE PROCEDURE dbo. FindCustomer

$CustomerID char(5)

LIKE

SELECT contactName

From Customers WHERE CustomerID=$CustomerID

调用语句

EXEC northwind.dbo. FindCustomer

$CustomerID= ‘thecr’

 

B

创办语句:

USE northwind

GO

CREATE PROCEDURE dbo. FindCustomer

@CustomerID char(5)

AS

SELECT contactName

From Customers WHERE @CustomerID=CustomerID

调用语句

EXEC northwind.dbo. FindCustomer

@CustomerID= ‘thecr’

     

      C

创建语句:

USE northwind

GO

CREATE PROCEDURE dbo. FindCustomer

@CustomerID char(5)

AS

SELECT contactName

From Customers WHERE CustomerID=@CustomerID

调用语句

EXEC northwind.dbo. FindCustomer

CustomerID= ‘thecr’

  

  D

创办语句:

USE northwind

GO

CREATE PROCEDURE dbo. FindCustomer

@CustomerID char(5)

LIKE

SELECT contactName

From Customers WHERE CustomerID=@CustomerID

调用语句

EXEC northwind.dbo. FindCustomer

@CustomerID= ‘thecr’

 

答: B

 

 

  1. 您在northwind数据库中创建了二个名字为overdueOrders的储存进程,并且没被加密。那么以下哪些措施能够查阅存款和储蓄进度的剧情。(不定项选拔卡塔尔(قطر‎

  A  EXEC sp_helptext
‘overdueOrders’

B  EXEC sp_help
overdueOrders

C  EXEC
sp_stored_procedures ‘overdueOrders’

D  EXEC sp_depends
‘overdueOrders’

发表评论

电子邮件地址不会被公开。 必填项已用*标注