HomeSQL SERVER INTERVIEW QUESTIONSPrint 1 to 10 Using While Loop in SQL Server : Interview Question Print 1 to 10 Using While Loop in SQL Server : Interview Question 0 Vikas 02:21 Write down the T-SQL Script to print then number from 1 to 10? Ans: declare @i int; set @i=1; while(@i<=10) Begin print(@i); set @i=@i+1; end Output: Tags MS SQL SERVER SQL INTERVIEW SQL INTERVIEW QUERY SQL SERVER SQL SERVER INTERVIEW QUESTIONS Newer Older