zoukankan      html  css  js  c++  java
  • MySQL中g和G的作用

    g的作用和MySQL中的分号”;"是一样;

    G的作用是讲查找到的内容结构旋转90度,变成纵向结构;

    下面举例说明,查找数据库中的存在的存储过程状态:

    SHOW PROCEDURE STATUS LIKE '%pricing%'g

    具体如下所示:

    mysql> SHOW PROCEDURE STATUS LIKE '%pricing%'g
    +-------+----------------+-----------+----------------+---------------------+---------------------+---------------+---------+----------------------+----------------------+--------------------+
    | Db    | Name           | Type      | Definer        | Modified            | Created             | Security_type | Comment | character_set_client | collation_connection | Database Collation |
    +-------+----------------+-----------+----------------+---------------------+---------------------+---------------+---------+----------------------+----------------------+--------------------+
    | my_db | productpricing | PROCEDURE | root@localhost | 2019-03-27 14:03:00 | 2019-03-27 14:03:00 | DEFINER       |         | utf8                 | utf8_general_ci      | utf8_general_ci    |
    +-------+----------------+-----------+----------------+---------------------+---------------------+---------------+---------+----------------------+----------------------+--------------------+
    1 row in set (0.00 sec)

    把g替换成G后,如下所示:

    mysql> show PROCEDURE STATUS LIKE '%pricing%'G
    *************************** 1. row ***************************
                      Db: my_db
                    Name: productpricing
                    Type: PROCEDURE
                 Definer: root@localhost
                Modified: 2019-03-27 14:03:00
                 Created: 2019-03-27 14:03:00
           Security_type: DEFINER
                 Comment:
    character_set_client: utf8
    collation_connection: utf8_general_ci
      Database Collation: utf8_general_ci
    1 row in set (0.00 sec)

    这样就一目了然的知道了有一个名称为productpricing的存储过程。

  • 相关阅读:
    HTML编码规范(转)
    ASP.NET连接MySQL数据库方法(测试可行)
    Redis源码解析05: 压缩列表
    Redis源码解析04: 跳跃表
    Redis源码解析03: 字典的遍历
    Redis源码解析02: 字典
    Redis源码解析01: 简单动态字符串SDS
    小象垃圾分类小程序从开始到结束
    spring boot踩坑记
    spring boot打包问题
  • 原文地址:https://www.cnblogs.com/malinzhai/p/10716380.html
Copyright © 2011-2022 走看看