myql定义和查看语句

 创建数据库:

  create database IF NOT EXISTS MY_TEST default charset utf8  COLLATE utf8_general_ci;

 

查看SQL语句执行计划:

    EXPLAIN  [partitions | extended]  select * from tableName where ...

    EXPLAIN 有两个属性 PARTITIONS(分区, MYSQL5.1后加入的)  和 EXTENDED

    PARTITIONS (关于分区的好文章http://fanqiang.chinaunix.net/db/mysql/2006-05-08/4135.shtml)

查看表的创建语句:

    show create table wx_ivr_menu;

查看表的索引:

    show index  FROM wx_ivr_menu;

从内存中查看表信息:

    SELECT table_rows FROM information_schema.tables WHERE table_schema='weixin_ent_suishi_2013' AND table_name='wx_ivr_menu' ;

posted on 2013-09-10 17:05  andydaopeng  阅读(196)  评论(0编辑  收藏  举报

导航