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
- oracle区分大小写的原因? 2021-01-01
- 什么是 orradiag_<user>文件夹? 2022-01-01
- mysql选择动态行值作为列名,另一列作为值 2021-01-01
- 表 './mysql/proc' 被标记为崩溃,应该修复 2022-01-01
- 二进制文件到 SQL 数据库 Apache Camel 2021-01-01
- 如何根据该 XML 中的值更新 SQL 中的 XML 2021-01-01
- MySQL 中的类型:BigInt(20) 与 Int(20) 2021-01-01
- 如何在 SQL 中将 Float 转换为 Varchar 2021-01-01
- 在 MySQL 中:如何将表名作为存储过程和/或函数参数传递? 2021-01-01