1.

If the PIPES_AS_CONCAT is disabled, ‘abc’ || ‘xyz’ results in ____________(a) 1(b) 0(c) error(d) -1I have been asked this question by my school teacher while I was bunking the class.This intriguing question comes from Expression Evaluation and Type Conversion topic in portion Data Types of MySQL

Answer»

Correct choice is (b) 0

Explanation: When the SQL mode PIPES_AS_CONCAT is DISABLED, the SQL standard ‘||’ OPERATION for string CONCATENATION is not valid in MySQL. Both operands are CONVERTED to zero. So the RESULT is zero.



Discussion

No Comment Found

Related InterviewSolutions