查看mysql库中所有表的大小和记录数 ,), 'MB') as total_size FROM information_schema.TABLES WHERE TABLE_SCHEMA='database_name' order by length desc 结果: +------------------------------+-------------+--------------+------------+------------+------------+| TABLE_NAME |
查询所有表名:select t.table_name from user_tables t;查询所有字段名:select t.column_name from user_col_comments t;查询指定表的所有字段名:select t.column_name from user_col_comments t where t.table_name = 'BIZ_DICT_XB';查询指定表的所有字段名和字段说明:select t.column_name, t.column_name from
转自 :http://gis-conquer.blog.sohu.com/170243422.html 查询所有表名:select t.table_name from user_tables t; 查询所有字段名:select t.column_name from user_col_comments t;查询指定表的所有字段名:select t.column_name from user_col_comments t where t.table_name = 'BIZ_DICT_XB';查询指定
查询所有表名:select t.table_name from user_tables t;查询所有字段名:select t.column_name from user_col_comments t;查询指定表的所有字段名:select t.column_name from user_col_comments t where t.table_name = 'BIZ_DICT_XB';查询指定表的所有字段名和字段说明:select t.column_name, t.column_name from
修改数据库配置文件:vim /etc/my.cnf [client] user=username password=password 使用shell脚本统计表中的行数据:count.sh #!/bin/bash dbname=test ip=192.168.1.100 for i in `mysql -h$ip -e "show tables from $dbname;" | egrep -v "\||Tables_in_$dbname"` do sleep 1 c
select utc.COLUMN_ID,utc.TABLE_NAME,utc.COLUMN_NAME,utc.DATA_TYPE||utc.DATA_LENGTH,utc.DATA_DEFAULT,utc.NULLABLE from user_tab_columns utc where table_name = upper('t_alert') order by utc.COLUMN_ID; select table_name from user_tables;
查询所有数据库占用磁盘空间大小的SQL语句: ,),' MB') as data_size, concat(,),'MB') as index_size from information_schema.tables group by TABLE_SCHEMA order by data_length desc; 查询单个库中所有表磁盘占用大小的SQL语句: ,),' MB') as data_size, concat(,),' MB') as index_size from informatio
查询数据库中所有表名select table_name from information_schema.tables where table_schema='数据库名' and table_type='base table';查询指定数据库中指定表的所有字段名column_nameselect column_name from information_schema.columns where table_schema='数据库名' and table_name='表名'; #查看分布式系统中不同
查询数据库中所有表名select table_name from information_schema.tables where table_schema='csdb' and table_type='base table'; 查询指定数据库中指定表的所有字段名column_nameselect column_name from information_schema.columns where table_schema='csdb' and table_name='users'
查询数据库中所有表名 select table_name from information_schema.tables where table_schema='tools' and table_type='base table'; 查询指定数据库中指定表的所有字段名column_name select column_name from information_schema.columns where table_schema='tools' and table_name='content_not