title: What do numbers with equality statements in the WHERE clause mean in SQL (WHERE 2>1)?
body: <p>I was looking at the Rails guides, and in the section to protect against SQL injections they state a hacker could inject the following code (<a href="http://guides.rubyonrails.org/security.html#sql-injection" rel="nofollow noreferrer">source</a>):</p>
  
  <pre><code>SELECT * FROM users WHERE login = '' OR '1'='1' AND password = '' OR '2'&gt;'1' LIMIT 1
  </code></pre>
  
  <p>It says in the Rails guide that: </p>
  
  <blockquote>
    <p>This will simply find the first record in the database, and grants
    access to this user.</p>
  </blockquote>
  
  <p>Can someone explain what is the overall term used in SQL to describe number queries (so I know how to google more info), and how does it work in the above example to bypass authentication?</p>