Data Types
Common list of datatypes used in a variaty of rdbms.
Data Type | Description | Example |
---|---|---|
varchar | Variable-length string; max length specified with varchar(x) . | varchar(50) - "Hello" |
nvarchar | Unicode string for international text; max length specified with nvarchar(x) . | nvarchar(50) - "" |
int | Integer for whole numbers. | int - 42 |
bigint | Large integer for values exceeding int capacity. | bigint - 922337203685 |
smallint | Smaller integer than int , saving space for smaller ranges. | smallint - 32767 |
tinyint | Very small integer, ranging from 0 to 255 . | tinyint - 200 |
bit | Boolean type; 1 for true, 0 for false. | bit - 0/1 (false/true) |
decimal | Fixed-precision and scale numeric; good for precise values like currency. Defined as decimal(p, s), where p is the total number of digits, and s is the number of digits after the decimal. | decimal(10,2) - 123.45 |
date | Stores date without time. | date - 2023-10-28 |
datetime | Stores both date and time values; often used for timestamps. | datetime - 2023-10-28 14:00:00 |
time | Stores time without date. | time - 14:00:00 |
See for fabric datatypes this page: Fabric datatypes