PE_-_DBI_-_02_-_SP_2024_-_Block_10_1501.webp
May76

PE_-_DBI_-_02_-_SP_2024_-_Block_10_1501.webp

  • Media owner May76
  • Ngày thêm
7 of 7 Paper No: 1
Picture 8.1
Question 9:
Create a store procedure named staff_order to count order of the staff where @staffid int is an input parameter and @countOrders int is an output parameter of the procedure.
For example, when we execute the procedure staff_order by using the following statements,the result should be as in the following figure:
declare @x int
exec staff_order 3, @x output
select @x as NumberOfOrders
Results NumberOfOrders
134
Messages
Picture 9.1
1
Question 10:
Create a function named OrderPrice to calculate the sum of list_price in table order_items,an input paramater is @orderld (int) and the output of the function is a decimal value.
For example, when we execute the function OrderPrice using the following statements, the result should be as in the following figure:
SELECT [dbo]. OrderPrice (3) AS sum_of_list_price
Results Messages
sum_of_list_price
1 1600
Picture 10.1
Zoom
+ 100%

Close
Chưa có bình luận nào.

Thông tin

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

Image metadata

Filename
PE_-_DBI_-_02_-_SP_2024_-_Block_10_1501.webp
File size
181.2 KB
Dimensions
1920px x 907px

Share this media

Back
Bên trên Bottom