Mysql Command

Oliver xu

This post will record all the mysql command that i used in my projects.

Show the size of the table

1
2
use information_schema; 
select concat(round(sum(data_length/1024),2),'KB') as data from tables where table_schema='futures';

Select the latest row of the table

1
select * from M0 where time=(select max(time) from M0);
  • 标题: Mysql Command
  • 作者: Oliver xu
  • 创建于 : 2019-11-05 12:55:04
  • 更新于 : 2024-12-21 21:05:39
  • 链接: https://blog.oliverxu.cn/2019/11/05/Mysql-Command/
  • 版权声明: 本文章采用 CC BY-NC-SA 4.0 进行许可。
评论