while ( select AVG(Rate)+2 From HumanResources.EmployeePayHistory) <20
begin
update HumanResources.EmployeePayHistory
set rate=rate+2
From HumanResources.EmployeePayHistory
if(select MAX(Rate)+2 From HumanResources.EmployeePayHistory)>127
break
else
continue
end
I have Execueted this query but I am Not able to know what is this query working ? what is the use of this query ?? it will be running update for more than 20 and less than 127 OR What ??
I am Totally Confused...!!