Home > database >  SQL server in the field of digital if is greater than 4 is equal to 4, less than 2 equals 2 how do y
SQL server in the field of digital if is greater than 4 is equal to 4, less than 2 equals 2 how do y

Time:02-06

SQL server in the field of digital if is greater than 4 is equal to 4, less than 2 equals 2 how do you spell the command?

CodePudding user response:


This mean?

The when col & gt; 4 then 4 when col & lt; 2 then 2 else col end

CodePudding user response:

The case when the number & gt; 4 then '4'
The else
The case when the number & lt; 2 then '2'
The else
The number of
End
End
As the 'result'

CodePudding user response:

 
The case when the number & gt; 4 then '4'
The else
The case when the number & lt; 2 then '2'
The else
The number of
End
End
As the 'result'

CodePudding user response:

It was ace
  • Related