Skip to main content

Data Types

Common list of datatypes used in a variaty of rdbms.

Data TypeDescriptionExample
varcharVariable-length string; max length specified with varchar(x).varchar(50) - "Hello"
nvarcharUnicode string for international text; max length specified with nvarchar(x).nvarchar(50) - ""
intInteger for whole numbers.int - 42
bigintLarge integer for values exceeding int capacity.bigint - 922337203685
smallintSmaller integer than int, saving space for smaller ranges.smallint - 32767
tinyintVery small integer, ranging from 0 to 255.tinyint - 200
bitBoolean type; 1 for true, 0 for false.bit - 0/1 (false/true)
decimalFixed-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
dateStores date without time.date - 2023-10-28
datetimeStores both date and time values; often used for timestamps.datetime - 2023-10-28 14:00:00
timeStores time without date.time - 14:00:00

See for fabric datatypes this page: Fabric datatypes