Conditions
eharetea

Using AND, OR and other operators in MySQL.

MySQL operators.

Date Created:Friday December 29th, 2006 03:41 AM
Date Modified:Friday August 01st, 2008 12:55 AM

# you can use statements to retrieve data:

SELECT * FROM folders WHERE (folder_id >= 10 ) AND (folder_id <= 20);
SELECT * FROM folders WHERE (folder_id >= 10 ) && (folder_id <= 20);

SELECT * FROM folders WHERE (folder_id = 10 ) OR (folder_id = 20);
SELECT * FROM folders WHERE (folder_id = 10 ) || (folder_id = 20);


operators:

=
<
>
<=
>=
!=
IS NOT NULL
IS NULL
BETWEEN
OR, ||
AND, &&
NOT, !