Home  >  Article  >  Database  >  How to query all table names under the current user in mysql

How to query all table names under the current user in mysql

王林
王林Original
2020-09-29 15:35:039045browse

Mysql method to query all table names under the current user: execute the sql statement [select * from sys.objects where type='U' order by name]. If you want to view the table structure, you can execute the [sp_help t_table] statement.

How to query all table names under the current user in mysql

View all table names under the currently logged in user

(Recommended tutorial: mysql tutorial)

select name from sys.objects where type='U' order by name 
select * from sys.objects where type='U' order by name

Table structure query

sp_help t_table

sp_columns t_table

Related recommendations:php training

The above is the detailed content of How to query all table names under the current user in mysql. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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