创建一个名为FindCustomer存储过程,可以用它来找出SQL SERVER中的

14 查阅
创建一个名为FindCustomer存储过程,可以用它来找出SQL SERVER中的northwind数据库的Customer表中,CustomerID为指定值(输入参数)的记录的ContactName字段的名称,然后调用这个存储过程,找出CustomerID为’thecr’的ContactName字段值,写出创建存储过程的SQL语句和调用的命令,以下选项哪一个是正确的。

创建语句:USE northwindGO CREATE PROCEDURE dbo. FindCustomer$CustomerID char(5)LIKESELECT contactName From Customers WHERE CustomerID=$CustomerID调用语句EXEC northwind.dbo. FindCustomer$CustomerID= ‘thecr’

创建语句:USE northwindGO CREATE PROCEDURE dbo. FindCustomer@CustomerID char(5)ASSELECT contactName From Customers WHERE @CustomerID=CustomerID调用语句EXEC northwind.dbo. FindCustomer@CustomerID= ‘thecr’

创建语句:USE northwindGO CREATE PROCEDURE dbo. FindCustomer@CustomerID char(5)ASSELECT contactName From Customers WHERE CustomerID=@CustomerID调用语句EXEC northwind.dbo. FindCustomerCustomerID= ‘thecr’

创建语句:USE northwindGO CREATE PROCEDURE dbo. FindCustomer@CustomerID char(5)LIKESELECT contactName From Customers WHERE CustomerID=@CustomerID调用语句EXEC northwind.dbo. FindCustomer@CustomerID= ‘thecr’

参考答案:

B

SQL试