zoukankan      html  css  js  c++  java
  • MYSQL第二课

    创建数据库:
    输入:CREATE DATABASE itcase;
    计算机输出:
    Query OK, 1 row affected
    查看数据库:
    输入:SHOW DATABASES;
    计算机输出:
    +--------------------+
    | Database           |
    +--------------------+
    | information_schema |
    | itcast             |
    | mysql              |
    | performance_schema |
    | test               |
    +--------------------+
    5 rows in set
    查看创建数据库的方式:     
    输入:SHOW CREATE DATABASE itcast;
    计算机输出:
    +----------+----------------------------------------------------------------+
    | Database | Create Database                                                |
    +----------+----------------------------------------------------------------+
    | itcast   | CREATE DATABASE `itcast` /*!40100 DEFAULT CHARACTER SET gbk */ |
    +----------+----------------------------------------------------------------+
    1 row in set
    修改后的数据库:
     输入:ALTER DATABASE itcast DEFAULT CHARACTER SET utf8;
    计算机输出:
    Query OK, 1 row affectedSHOW CREATE DATABASE itcast;
    +----------+-----------------------------------------------------------------+
    | Database | Create Database                                                 |
    +----------+-----------------------------------------------------------------+
    | itcast   | CREATE DATABASE `itcast` /*!40100 DEFAULT CHARACTER SET utf8 */ |
    +----------+-----------------------------------------------------------------+
    1 row in set
    删除数据库:
    输入:DROP DATABASE itcast;
    计算机输出:
    Query OK, 0 rows affected
     
    查看数据库:
     输入:SHOW DATABASES;
    计算机输出:
    +--------------------+
    | Database           |
    +--------------------+
    | information_schema |
    | mysql              |
    | performance_schema |
    | test               |
    +--------------------+
    4 rows in set
  • 相关阅读:
    echarts图表重设尺寸
    文本文档中各字母出现次数汇总(java)
    30道随机运算
    随机生成验证码
    原码,反码,补码
    动手动脑(一)
    模拟银行ATM系统(基础版)
    2018暑期周总结报告(五)
    2018暑期周总结报告(四)
    2018暑期周总结报告(三)
  • 原文地址:https://www.cnblogs.com/alannever/p/14135480.html
Copyright © 2011-2022 走看看