Mysql Tips

List all tables and count in mysql

SELECT table_name, table_rows FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'emsadmin' order by table_rows asc;

Counting the number of rows in a large table

select table_rows from information_schema.tables where table_name = 'HistoricalAlarm';

Create a csv file using name coloun of Ne Table. 

select name from Ne limit 1,1470 into outfile '/tmp/nelist.csv' fields terminated by ',';

Comments

Popular posts from this blog

vmWare - Vcenter Server Appliance 5.5 - embedded DB problem

Installing Pytest on Windows Platform

Shell Scripting