• ADADADADAD

    MYSQL常用的SQL指的是什么[ mysql数据库 ]

    mysql数据库 时间:2024-11-28 13:00:23

    作者:文/会员上传

    简介:

    A quick way to list your FKs (Foreign Key references) using the KEY_COLUMN_USAGE view:SELECT CONCAT( table_name, '.',column_name, ' -> ',referen

    以下为本文的正文内容,内容仅供参考!本站为公益性网站,复制本文以及下载DOC文档全部免费。

    A quick way to list your FKs (Foreign Key references) using the KEY_COLUMN_USAGE view:

    SELECT CONCAT( table_name, '.',
    column_name, ' -> ',
    referenced_table_name, '.',
    referenced_column_name ) AS list_of_fks
    FROM information_schema.KEY_COLUMN_USAGE
    WHERE REFERENCED_TABLE_SCHEMA = (your schema name here)
    AND REFERENCED_TABLE_NAME is not null
    ORDER BY TABLE_NAME, COLUMN_NAME;


    统计库大小
    SELECT concat( table_schema, '.', table_name ) table_name,
    concat( round( data_length / ( 1024 *1024 ) , 2 ) , 'M' ) data_length,
    concat( round( index_length / ( 1024 *1024 ) , 2 ) , 'M' ) index_length,
    concat( round( round( data_length + index_length ) / ( 1024 *1024 ) , 2 ) , 'M' ) total_size
    FROM information_schema.TABLES
    ORDER BY data_length DESC;

    MYSQL常用的SQL指的是什么.docx

    将本文的Word文档下载到电脑

    推荐度:

    下载
    热门标签: mysqlsql