by default I have one column in MySQL table to be NULL.
I want to select some rows but only if the field value in that column is not NULL.
what is the correct way of typing it?
$query = "SELECT *
FROM names
WHERE id = 1
AND name != NULL";
Is this correct?
You should use:
You must use
IS NULLorIS NOT NULLwhen working with NULL values