alter proc getWeek
@weeks varchar(50)asdeclare @i int, @weekName varchar(50)set @i=0set @weekName='Sunday'select @weeks= case when @weeks = '0' then 'Monday' when @weeks = '1' then 'Firthday' when @weeks = '2' then 'Wenday' when @weeks = '3' then 'Thirday' when @weeks = '4' then 'Friday' when @weeks = '5' then 'Staterday' else @weekNameendprint @weeksalter proc getCurTable_Test
@userName varchar(50)asdeclare my_cursor cursor for select userName,passWord from Table_Testdeclare @u varchar(50),@p varchar(50)open my_cursorfetch next from my_cursor into @u, @pwhile(@@fetch_status=0) begin print @u + @p fetch next from my_cursor into @u, @p end--fetch first from my_cursor into @u, @pclose my_cursordeallocate my_cursorselect userName,passWord from Table_Test
exec getName 'xsddm'exec getWeek '0'exec getCurTable_Test ''