zoukankan      html  css  js  c++  java
  • mysql

    -- 列出 MySQL 数据库管理系统的数据库列表。
    show databases;
    
    -- 选择要操作的Mysql数据库,使用该命令后所有Mysql命令都只针对该数据库。
    use mysql;

      -- 获取建表语句
      show create table employee;
    -- 显示指定数据库的所有表,使用该命令前需要使用 use 命令来选择要操作的数据库。
    show tables;
    
    -- 显示数据表的属性,属性类型,主键信息 ,是否为 NULL,默认值等其他信息。
    show columns from CHARACTER_SETS;
    
    -- 显示数据表的详细索引信息,包括PRIMARY KEY(主键)。
    show index from CHARACTER_SETS;
    
    -- 显示数据库 mysql 中所有表的信息
    show table status from mysql;
    
    -- 表名以 help_ 开头的表的信息
    show table status from mysql like 'help_%';
    
    -- 加上 G,查询结果按列打印 [只能在命令窗口使用]
    show table status from mysql like 'help_%'G;
    
    -- 服务器版本信息
    select version();
    
    -- 当前数据库名 (或者返回空)
    select database();
    
    -- 当前用户名
    select user();
    
    -- 服务器状态
    show status;
    
    -- 服务器配置变量
    show variables;
    

      

  • 相关阅读:
    Codeforces Round #226 (Div. 2)
    内存管理
    C/C++ 函数
    Codeforces Round #225 (Div. 2)
    常用链表操作总结
    Codeforces Round #224 (Div. 2)
    Codeforces Round #223 (Div. 2)
    Codeforces Round #222 (Div. 2)
    -树-专题
    Codeforces Round #221 (Div. 2)
  • 原文地址:https://www.cnblogs.com/gygtech/p/13636455.html
Copyright © 2011-2022 走看看