Warning: Creating default object from empty value in /www/htdocs/v030397/mysql-qotd/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 4991

Warning: Creating default object from empty value in /www/htdocs/v030397/mysql-qotd/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 4993
Question 40: Which of the following queries return 0? – MySQL Question of the Day

Skip to content

By urs in mysql questions

 
(Find all correct answers)
 

a) select count(i)
     from (select 1 as i union select 2 union select null) v1
     where i is null;
 
b) select count(*)
     from (select 1 as i union select 2 union select null) v1
     where i is null;
 
c) select count(*)
     from (select 1 as i union select 2 union select null) v1
     where i <=> null;
 
d) select count(*)
     from (select 1 as i union select 2 union select null) v1
     where i = null;

 
[ SQL Expressions (15%) - NULL Values ]
 

Tags: , ,

Comment Feed

One Response

You must be logged in to post a comment.