title: How to print a table row wise in SQL Server?
body: <p>I have created a function that outputs the table of a number, Here is my UDF scalar function:</p>
  
  <pre><code>create function fntable(@a int)
  returns varchar(250)
  as begin
  declare @b int, @c varchar(250),@e varchar(50)=''
  set @b=1
  while (@b&lt;=10)
  begin
  set @c=@a*@b
  set @e=@e+@c
  set @b=@b+1
  end
  return @e
  end
  </code></pre>
  
  <p>It displays what i want, but it displays the result in a single row, as per my knowledge. I want to display the rows in multiple rows. How can i do this ? i want to print a table of a number.</p>