ISNULL() in mysql

SELECT * FROM table1 LEFT JOIN table2 ON table2 .folder_id = table1.id
WHERE members_folders.mem_id=’1100′ AND ISNULL(table2.id)

-get records from table1 that doesn’t have a record on table2

ISNULL() – Test whether the argument is NULL

source: http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#function_isnull








This entry was posted in mysql and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>