1.

Which function returns NULL if expr1 = expr2?(a) CASE(b) IF()(c) IFNULL()(d) NULLIF()I had been asked this question during a job interview.I would like to ask this question from Functions topic in portion Data Type Reference, Operators and Functions of MySQL

Answer»

Right OPTION is (d) NULLIF()

The EXPLANATION: The ‘CASE’ is used for the case operator. The FUNCTION ‘IF()’ is used for the if/else construct. The function ‘IFNULL()’ is the NULL if/else construct. ‘NULLIF()’ RETURNS NULL if expr1 = expr2.



Discussion

No Comment Found

Related InterviewSolutions