Q49.webp
Nitta93

Q49.webp

  • Media owner Nitta93
  • Ngày thêm
Kizspy Question: 49
(Choose 1 answer)
The following SQL statement creates a stored procedure that count number of customers in each City from
the "Customers" table:
CREATE PROCEDURE CountOfCustomers
@City nvarchar(30), @CountCus int OUTPUT
AS
SET @CountCus = (
SELECT COUNT(CustomerID) FROM Customers
WHERE City
GROUP BY City
= @City
Which of the following is the way to execute a procedure?
A. DECLARE @CountCustomers int
EXEC CountOfCustomers @City = 'Berlin', @CountCus= @CountCustomers;
B. DECLARE @CountCustomers int
EXEC CountOfCustomers @City = 'Berlin', @CountCus= @CountCustomers OUTPUT;
C. EXECUTE CountOfCustomers 'Berlin', @CountCus= @CountCustomers OUTPUT;
D. DECLARE @CountCustomers int
EXEC CountOfCustomers @CountCus= @CountCustomers OUTPUT;

Thông tin

Category
DBI202
Thêm bởi
Nitta93
Ngày thêm
Lượt xem
2,682
Lượt bình luận
7
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom