When you run below query, your are asking mysql
to display the result of database()
function. (Reference).
mysql> select database();
But in the below case, mysql
throws an error as no database is selected till this point.
mysql> select databese();
ERROR 1046 (3D000): No database selected
When you have selected a database, mysql
looks for a function named databese()
within your DB but since it is not defined it throws the given error.
mysql> select databese();
ERROR 1305 (42000): FUNCTION hoge.databese does not exist