1.

Suppose a stored function named PI() is written in the database ‘sampdb’. How would it be called?(a) PI()(b) sampdb.PI()(c) MySQL.PI()(d) db.PI()I have been asked this question during a job interview.This interesting question is from Stored Functions and Procedures topic in section Stored Programs of MySQL

Answer»

Right OPTION is (b) sampdb.PI()

The BEST I can explain: When a stored FUNCTION is DEFINED with the same name as a built in function, the function name should be qualified with the database name when it is invoked. The function ‘PI()’ is built in.



Discussion

No Comment Found

Related InterviewSolutions