Comparison operators 

To recap what was covered in Chapter 6Querying a Single Table, the following table lists comparison operators: 

Symbol Description Examples
= equal column = 'text'
column = 1
>= greater than or equal to column >= 1
> greater than column > 1
<=  less than or equal to column <= 1
< less than  column < 1
<> does not equal column <> 'text'
column <> 1
!= does not equal column != 'text'
column != 1

 

Some example use cases of comparison operators are listed here: 

  • WHERE column = 100—This will return all rows where a column value equals 100
  • WHERE column = 'string value'—This will return all rows where a column value equals 'string value'
  • WHERE column != 1000—This will return all rows where a column value does not equal 1000
  • WHERE column <> 'string value'—This will return all rows where a column value does not equal 'string value'.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.130.201