PostgreSQL데이터 타입과 MS SQL 데이터 타입과의 비교.
Data type | PostgreSQL | SQL Server |
64-bit integer | BIGINT | BIGINT |
Fixed length byte string | BYTEA | BINARY(n) |
1, 0 or NULL | BOOLEAN | BIT |
Fixed length char string, 1 <= n <= 8000 | CHAR(n) | CHAR(n) |
Variable length char string, 1 <= n <= 8000 | VARCHAR(n) | VARCHAR(n) |
Variable length char string, <= 2GB | TEXT | VARCHAR(max) |
Variable length byte string , 1 <= n <= 8000 | BYTEA | VARBINARY(n) |
Variable length byte string , <= 2GB | BYTEA | VARBINARY(max) |
Variable length Unicode UCS-2 string | VARCHAR(n) | NVARCHAR(n) |
Variable length Unicode UCS-2 data, <= 2GB | TEXT | NVARCHAR(max) |
Variable length character data, <= 2GB | TEXT | TEXT |
Variable length Unicode UCS-2 data, <= 2GB | TEXT | NTEXT |
Double precision floating point number | DOUBLE PRECISION | DOUBLE PRECISION |
Floating point number | DOUBLE PRECISION | FLOAT(p) |
32 bit integer | INTEGER | INTEGER |
Fixed point number | NUMERIC(p,s) | NUMERIC(p,s) |
Date includes year, month, and day | DATE | DATE |
Date and time with fractional seconds | TIMESTAMP(p) | DATETIME, DATETIME2(p) |
Date and time with time zone | TIMESTAMP(p) WITH TIME ZONE | DATETIMEOFFSET(p) |
Date and time | TIMESTAMP(0) | SMALLDATETIME |
Unsigned integer, 0 to 255 (8 bit) | SMALLINT | TINYINT |
UUID (16 byte) | CHAR(16) -> CHAR(36) *16자리로는 Mig 불가능. | UNIQUEIDENTIFIER |
Automatically updated binary data | BYTEA | ROWVERSION |
Currency amount (32 bit) | MONEY | SMALLMONEY |
Variable length binary data, <= 2GB | BYTEA | IMAGE |
Geometric types | POINT, LINE, LSEG, BOX, PATH, POLYGON, CIRCLE | GEOMETRY |
#참조 : PostgreSQL vs. SQL Server (MSSQL) - Extremely Detailed Comparison (enterprisedb.com)
'MS Azure Log > Azure PostgreSQL' 카테고리의 다른 글
2-3. Azure PostgreSQL Data Type - 문자열형식 (0) | 2023.01.13 |
---|---|
4-1. Azure PostgreSQL Procedure(프로시저) 만들기 (0) | 2023.01.12 |
3-2-1. Azure PostgreSQL 사용자(User/Role) 만들기-(테이블 권한없음-해결) (0) | 2023.01.03 |
3-2. Azure PostgreSQL 사용자(User/Role) 만들기 (0) | 2023.01.02 |
3-1. Azure PostgreSQL 스키마(Schema) 관리 (0) | 2023.01.02 |