Home >Database >Mysql Tutorial >What should I do if the SQL query prompts that the object name is invalid?
Problem description:
When performing sql query, sometimes you will encounter the following situation: the query fails, prompting "The object name XXX is invalid."
(Recommended learning: mysql tutorial)
Cause analysis:
examTest is just the table name, no database name is specified, plus The database name and owner name will do.
Solution:
Add the database name when querying. If just adding the database name still doesn't work, it may be because the tables in the database are managed by roles, and not all roles can query a certain table, so the owner needs to be added.
As shown:
The above is the detailed content of What should I do if the SQL query prompts that the object name is invalid?. For more information, please follow other related articles on the PHP Chinese website!