e enjte, 14 qershor 2007

Session 14_Q2

2. ALTER PROCEDURE Get_Sales_Avg
AS
declare @tuan int
select @tuan=avg(a.ytd_sales)
from titles a, titleauthor b
where b.title_id=a.title_id and b.au_id='267-41-2394'
if @tuan>5000
print 'High year-to-day sales'
else if @tuan<=5000
print 'Low year-to-day sales'

Nuk ka komente: