Оффициальная дока microsoft Оффициальная дока postgres

Десятичные точные числа

decimal

The default precision is 18 (m)

numeric(m,n)

m - число символов в числе, включая точку

n - число знаков после запятой

m не превосходит 37 (38)

The decimal and numeric data types are identical

int

bigint

smallint

tinyint

bit

Приблизительные числа

float

real

Строковые

char(n)

nchar(n)

varchar(n)

nvarchar(n)

text

ntext

varchar(max)

nvarchar(max)

Денежные

money

числа до 4 знаков после запятой

You don’t need to enclose currency or monetary data in single quotation marks ('). While you can specify monetary values preceded by a currency symbol, SQL Server doesn’t store any currency information associated with the symbol, it only stores the numeric value

smallmoney

Даты и время

date

time

datetime

datetime2

smalldatetime

datetimeoffset

Бинарные

binary(n)

фиксированной длины до 8000 байт

varbinary(n)

переменной длины до 8000 байт (размер + указатель (2 байта))

varbinary(max)

max indicates that the maximum storage size is 2^31-1 bytes.

image

Variable-length binary data from 0 through 2^31-1 (2,147,483,647) bytes.

Другие типы данных