CREATE DATABASE
defines database (no row flow)
What changes
- Input
- catalog
- Output or change
- catalog: database
Syntax at a glance
CREATE DATABASE database_name [ CONTAINMENT = { NONE | PARTIAL } ] [ ON [ PRIMARY ] <filespec> [ , ...n ] [ , <filegroup> [ , ...n ] ] [ LOG ON <filespec> [ , ...n ] ] ] [ COLLATE collation_name ] [ WITH <option> [ , ...n ] ] [ ; ]
Work example
A release needs a new database with reviewed files, growth settings, and recovery model.
Review data and log paths, initial sizes, growth increments, collation, owner, and restore plan before creation.
Check your work The database settings match capacity and recovery targets and its files use approved storage.
Open Microsoft Learn for full syntax, permissions, and details for your version.