1.

What does ‘abc’ || ‘xyz’ result in if the PIPES_AS_CONCAT is disabled?(a) 1(b) 0(c) error(d) -1I had been asked this question in an interview for internship.The query is from Using Perl DBI in Web Applications in division MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

Right ANSWER is (b) 0

For 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