結果 : while loop with if condition in sql server