We have string data in our student3 table ( download the sql dump ).
SELECT * from student3 where class IS TRUE
Output
id
name
class
mark
7
My John Rob
5
5
Any value 1 or more will return True while comparing with IS operator. Here for record no 7 we have 5 in class column, so it returns True.
SELECT * from student3 WHERE class IS FALSE
We will get all records except the records where class value is 1 or more ( one record , id = 7 ) , where NULL value is present. ( three records id 2,4 ,6 )
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery,
and web development at plus2net. The tutorials focus on clear explanations, working
examples, and code that readers can test and adapt while learning.