0:00
0% complete
LearnStep 1 of 2
DDL Statements
Learning Objectives
- •Create tables
- •Define constraints
- •Modify table structure
Lesson Outline
LearnStep 1/2
DDL Statements
sql
Data Types
| Type | Description | Example |
|---|---|---|
| INT / INTEGER | Whole numbers | 42 |
| DECIMAL(p,s) | Fixed precision | 123.45 |
| VARCHAR(n) | Variable string | 'Hello' |
| TEXT | Long text | Article content |
| DATE | Date only | '2024-01-15' |
| TIMESTAMP | Date and time | '2024-01-15 10:30:00' |
| BOOLEAN | True/False | TRUE |
Constraints
sql
ALTER TABLE
sql
DROP TABLE
sql