• + 0 comments

    I wrote the below in sql server to solve this. The output is as expected but i still get some 'run time error'. i wonder why!!

    create procedure triangle as declare @i int declare @j int

    set @i=1 set @j=20

    while @j>=@i begin print replicate ('*', @j) set @j=@j-1 end

    execute triangle