title: How to merge multiple select statement result into single select statement?
body: <p>I have write stored procedure given below.</p>
  
  <pre><code>ALTER PROCEDURE StudentDemo @RollNo INT
  /*
  StudentDemo 504
  */
  AS
  BEGIN
      DECLARE @CurrentID INT
  
      --Get the Current RollNo's ID
      SELECT @CurrentID = ID FROM StudentData WHERE RollNo = @RollNo
  
      SELECT @CurrentID AS 'CurrentID'
  
      --Previous ID
      SELECT RollNO AS 'PreviousID' FROM StuDentData WHERE ID = @CurrentID - 1
  
      --Next ID
      SELECT RollNO AS 'NextID' FROM StuDentData WHERE ID = @CurrentID + 1
  END
  </code></pre>
  
  <p>I want all the result of  select statement in single one and put result in temporary table</p>