Ads by ProfitSence
Close

SQL Filtering records Code Example

Last Updated on Wednesday 5th Oct 2022
  • SQL is written in statements that ask the database to perform many things.

  • SQL talks to the database.

			
					SELECT name, author FROM books WHERE ratings > 10;

			
	

<table><tbody><tr><td>=</td><td>equal</td><td></td><td>less or equal</td></tr><tr><td>></td><td>greater than</td><td></td><td>not equal</td></tr><tr><td></td><td>less than</td><td>!=</td><td>not equal</td></tr><tr><td>>=</td><td>greater or equal</td><td>BETWEEN</td><td>between two values</td></tr><tr><td>IN</td><td>in a list</td><td>NOT IN</td><td>not in a list</td></tr></tbody></table>

			
					SELECT name, author FROM books WHERE ratings BETWEEN 5 AND 10;