2004 发表于 2018-10-23 09:52:58

常用sql(持续更新中......)

  #查看当前正在执行的sql语句
  show processlist;
  #查看用户的权限
  show grants for real@ '192.168.80.%'
  #查询表的记录数
  select count(*) from table_name;
  #查询表结构
  desc table_name;
  show create table table_name\G
  #查询索引
  show index from table_name\G
  #修改表的引擎
  ALTER TABLE `zaoren_sid` ENGINE=InnoDB;
  #更改字段名
  alter table tbl_name change 旧字段 新字段 新字段类型;

页: [1]
查看完整版本: 常用sql(持续更新中......)