MYSQL database name, table name, field name query

Source: Internet
Author: User

Query all fields of all tables:

Select *  from WHERE table_name='sys_users'

Effect:

Query all fields of the specified table:

Select *  from WHERE table_name='sys_users' and Table_schema= ' Taoke '

Effect:

Query the specified type of all fields of the specified table, note:

Query All tables that contain this field name:

SELECT *  from WHERE column_name='name';

Query the table that contains this field name for the specified database:

SELECT *  from WHERE column_name='name' and Table_schema='  wljdb';

Querying all fields of a specified table in a specified table database

Select  from WHERE table_name='sys_users' and Table_schema=  'taoke'

Queries the specified table database for the second field name of the specified table:

Select  from WHERE table_name='sys_users' and Table_schema=  'taoke'1,1

Above, extrapolate

---------------------finished----------------------------

MySQL permissions Grant

Http://www.cnblogs.com/Richardzhu/p/3318595.html

MYSQL database name, table name, field name query

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.