Home > Database > Mysql Tutorial > body text

What should I do if the SQL query prompts that the object name is invalid?

王林
Release: 2020-06-24 10:40:42
Original
8033 people have browsed it

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)

What should I do if the SQL query prompts that the object name is invalid?

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:

What should I do if the SQL query prompts that the object name is invalid?

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!