MySQL 'create schema' and 'create database' - Is there any difference

前端 未结 6 2026
慢半拍i
慢半拍i 2020-12-04 08:55

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 (

6条回答
  •  难免孤独
    2020-12-04 09:14

    So, there is no difference between MySQL "database" and MySQL "schema": these are two names for the same thing - a namespace for tables and other DB objects.

    For people with Oracle background: MySQL "database" a.k.a. MySQL "schema" corresponds to Oracle schema. The difference between MySQL and Oracle CREATE SCHEMA commands is that in Oracle the CREATE SCHEMA command does not actually create a schema but rather populates it with tables and views. And Oracle's CREATE DATABASE command does a very different thing than its MySQL counterpart.

提交回复
热议问题