Sunday, February 23, 2020

Logical: LESS THAN

  1. SELECT title, released_year FROM books;
  2.  
  3. SELECT title, released_year FROM books
  4. WHERE released_year < 2000;
  5.  
  6. SELECT title, released_year FROM books
  7. WHERE released_year <= 2000;
  8.  
  9. SELECT 3 < -10;
  10. -- false
  11.  
  12. SELECT -10 < -9;
  13. -- true
  14.  
  15. SELECT 42 <= 42;
  16. -- true
  17.  
  18. SELECT 'h' < 'p';
  19. -- true
  20.  
  21. SELECT 'Q' <= 'q';
  22. -- true

No comments:

Post a Comment

Right Joins

-- OUR FIRST RIGHT JOIN (seems the same as a left join?) SELECT * FROM customers RIGHT JOIN orders     ON customers.id = orders.custom...