zoukankan      html  css  js  c++  java
  • mysql 表名和字段、备注

    select
         t1.table_schema
        ,t1.table_name
        ,t1.table_comment
        ,t2.ordinal_position
        ,t2.column_name
        ,t2.data_type
        ,t2.character_maximum_length
        ,t2.column_type
        ,t2.column_comment
    from information_schema.tables t1
    left join information_schema.columns t2
        on t1.table_schema = t2.table_schema and t1.table_name = t2.table_name
    where t1.table_schema = 'evaluate_fk'
        and t1.table_type = 'BASE TABLE'
        and t1.table_name like 'kc%'
    order by
         t1.table_schema
        ,t1.table_name
        ,t2.ordinal_position
    ;
    select
         column_name
        ,data_type
        ,CHARACTER_MAXIMUM_LENGTH
        ,column_type
        ,column_comment
    from information_schema.columns
    where TABLE_SCHEMA ='db_name'
        and TABLE_NAME = 'v_name'
    order by ORDINAL_POSITION
    ;
  • 相关阅读:
    Demo
    Demo
    z-yelir-~
    CSP考前总结
    NOIP刷题
    清北学堂
    qsing
    【csp模拟赛九】--dfs3
    【csp模拟赛九】--dfs2
    【csp模拟赛九】--dfs
  • 原文地址:https://www.cnblogs.com/chenzechao/p/11539839.html
Copyright © 2011-2022 走看看