# Create Database Scripts in T-SQL

Turn a design into a script that builds it - CREATE DATABASE, CREATE TABLE with types, NOT NULL, IDENTITY and DEFAULT, and constraints for primary keys, foreign keys, UNIQUE and CHECK.

![Cheat sheet: Create Database Scripts in T-SQL](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/c16fb816e4244866bc41c24bd2e180d4.webp)

- Category: SQL
- Level: Journeyman
- Tags: CHECK Constraint, Constraint, CREATE TABLE, Data Definition Language (DDL), IDENTITY (t-sql), sql, t-sql, UNIQUE Constraint
- Updated: November 3, 2026

Source: https://www.ask-codey.com/cheat-sheets/foundations-of-database-design-create-database-scripts-in-t-sql-cheat-sheet
