Friday, 9 December 2016

How to Use While LOOP in SQL

  1. DECLARE @TOTALV BIGINT  
  2. DECLARE @InitialValue BIGINT  
  3. SET @InitialValue=1  
  4. SET @TOTALV=12  
  5. WHILE (@InitialValue<=@TOTALV)  
  6. BEGIN  
  7. print @InitialValue  
  8. SET @InitialValue=@InitialValue+1  
  9. END  

No comments:

Post a Comment

STEPS TO SAVE YOUR EYES WHILE WORKING ON COMPUTER

STEPS TO SAVE YOUR EYES WHILE WORKING ON COMPUTER This is the report for all you people who works more and more on computer for long t...