CREATE SCHEMA
CREATE SCHEMA is a SQL statement in the DDL Statements category. Creates a database schema — a logical container for database objects (tables, views, etc.). The syntax is CREATE SCHEMA [schema_name] [AUTHORIZATION owner];. It returns new schema. A typical example: CREATE SCHEMA sales; CREATE TABLE sales.orders (id INT); -- PostgreSQL with authorization: CREATE SCHEMA hr AUTHORIZATION admin_user; A close relative is CREATE TABLE, which creates a new table in the database with specified columns, data types, and constraints. A close relative is ALTER TABLE, which modifies an existing table: add/drop columns, modify data types, rename, add/drop constraints. A close relative is DROP TABLE, which permanently removes a table and all its data from the database. Cannot be undone. More about this category: Data Definition Language — CREATE TABLE, ALTER TABLE, DROP TABLE, TRUNCATE, CREATE INDEX. Related DDL Statements entries: CREATE TABLE, ALTER TABLE, DROP TABLE, TRUNCATE TABLE, RENAME TABLE, CREATE DATABASE, DROP DATABASE, ALTER TABLE ADD COLUMN.