MySQL #39;create schema#39; and #39;create database#39; - Is there any difference(MySQL“创建模式和“创建数据库-有什么区别)
问题描述
在information_schema 数据库中达到峰值并在我的一个宠物项目的元数据 中达到峰值,我很难理解有什么(如果有的话)差异create schema 命令和 create database 命令之间存在 MySQL.
Taking a peak into the information_schema database and peaking at the metadata for one of my pet projects, I'm having a hard time understanding what (if any) differences there are between the create schema command and the create database command for MySQL.
有什么不同吗?如果不是,这是否是关系数据库的一种相当典型的行为模式(我听说对于其他数据库,例如 Oracle,数据库中存在模式,而不是与数据库处于同一级别).
Are there any differences? If not, is this a rather typical pattern of behavior for relational databases (I've heard that for other databases, such as Oracle, a schema exists in a database, rather than being on the same level as a database).
谢谢!
推荐答案
MySQL 文档说:
CREATE DATABASE 创建一个数据库用给定的名字.要使用这个声明,你需要 CREATE数据库的特权.创建SCHEMA 是 CREATE 的同义词从 MySQL 5.0.2 开始的数据库.
CREATE DATABASE creates a database with the given name. To use this statement, you need the CREATE privilege for the database. CREATE SCHEMA is a synonym for CREATE DATABASE as of MySQL 5.0.2.
因此,这两条指令执行相同操作似乎很正常.
So, it would seem normal that those two instruction do the same.
这篇关于MySQL“创建模式"和“创建数据库"-有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:MySQL“创建模式"和“创建数据库"-有什么区别
基础教程推荐
- 是否可以执行按位分组功能? 2021-01-01
- SQL Server 实例在登录协商期间返回无效或不受支持的协议版本 2021-01-01
- 在 SQL 中连接多个表 2021-01-01
- SQL 效率:WHERE IN 子查询 vs. JOIN 然后 GROUP 2021-01-01
- 将 SQL Server DateTime 列迁移到 DateTimeOffset 2021-01-01
- 无法解决整理冲突 2021-01-01
- 需要 MySQL 5.1 中的抽象触发器来更新审计日志 2021-01-01
- 如何使用 mysql.connector 禁用查询缓存 2022-01-01
- SQL:使用来自具有相同列名的两个表中的数据... 2021-01-01
- SSMS 中的权限问题:“对象 'extended_properties'、数据库 'mssqlsystem_resource'、... 错误 229)上的 SELECT 权限被拒绝" 2022-01-01
