Home > Database > Mysql Tutorial > body text

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

王林
Release: 2020-09-29 15:35:03
Original
9097 people have browsed it

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
Copy after login

Table structure query

sp_help t_table

sp_columns t_table
Copy after login

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!

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