Less than or equal
Returns true when the left operand is less than or equal to the right operand.
Category: comparison
SQL symbol: <=
Syntax
sql
<left> <= <right>Parameters
<left>— The value to compare. Acceptsdate,decimal,float,integer,interval,nvarchar,timestamp,varbinary,varchar.<right>— The value to compare it against. Acceptsdate,decimal,float,integer,interval,nvarchar,timestamp,varbinary,varchar.
Returns
Examples
sql
SELECT name FROM $planets WHERE gravity <= 5;Mercury
Mars
Pluto
Signatures
date <= date→ booleandate <= timestamp→ booleandecimal <= decimal→ booleandecimal <= float→ booleandecimal <= integer→ booleanfloat <= decimal→ booleanfloat <= float→ booleanfloat <= integer→ booleaninteger <= decimal→ booleaninteger <= float→ booleaninteger <= integer→ booleaninterval <= interval→ booleannvarchar <= nvarchar→ booleannvarchar <= varbinary→ booleannvarchar <= varchar→ booleantimestamp <= date→ booleantimestamp <= timestamp→ booleanvarbinary <= nvarchar→ booleanvarbinary <= varbinary→ booleanvarbinary <= varchar→ booleanvarchar <= nvarchar→ booleanvarchar <= varbinary→ booleanvarchar <= varchar→ boolean
Notes
NULL on either side gives NULL, so ordering comparisons never match an absent value.