暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

mysql数据库之DDL数据定义语言介绍

227decision 2020-03-28
763

mysql数据库创建、查看以及使用和切换


直接创建数据库 db1

    create database db1;

    查看当前使用的库

      select database();

      使用和切换库

        use db1;

        创建数据库时进行判断是否存在

          create database  if not exists db2;

          创建数据库并指定字符集

            create database  if not exists db3 default character set utf8mb4;

            查看库的字符集

              show create database db3;

              查看mysql使用的字符集

                show variables like 'character%';

                删除数据库

                  drop database db1;


                  最后修改时间:2020-07-01 13:33:54
                  文章转载自227decision,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

                  评论