티스토리 뷰
반응형
Numeric
정수 또는 소수 값을 저장
Oracle 에서의 Number, MySQL Decimal 와 같은 의미로 보면 된다.
Numeric(p,s) 실수(10진수) p : , s: 소수점 자리수
ex ) numeric(7,3) -> 전체자리는 7자리, 소수점 3자리를 의미함
Integer
오직 정수만 저장
NameStorage SizeDescriptionRange
smallint | 2 bytes | small-range integer | -32768 to +32767 |
integer | 4 bytes | typical choice for integer | -2147483648 to +2147483647 |
bigint | 8 bytes | large-range integer | -9223372036854775808 to 9223372036854775807 |
decimal | variable | user-specified precision, exact | up to 131072 digits before the decimal point; up to 16383 digits after the decimal point |
numeric | variable | user-specified precision, exact | up to 131072 digits before the decimal point; up to 16383 digits after the decimal point |
real | 4 bytes | variable-precision, inexact | 6 decimal digits precision |
double precision | 8 bytes | variable-precision, inexact | 15 decimal digits precision |
serial | 4 bytes | autoincrementing integer | 1 to 2147483647 |
bigserial | 8 bytes | large autoincrementing integer | 1 to 9223372036854775807 |
https://www.postgresql.org/docs/9.1/datatype-numeric.html
PostgreSQL: Documentation: 9.1: Numeric Types
Numeric types consist of two-, four-, and eight-byte integers, four- and eight-byte floating-point numbers, and selectable-precision decimals. Table 8-2 lists the available types. Table 8-2. Numeric Types Name Storage Size Description Range smallint 2 byte
www.postgresql.org
반응형
'DB' 카테고리의 다른 글
📌 [PostgreSQL] UUID vs SERIAL: 기본 키로 어떤 것을 선택해야 할까? (0) | 2025.02.18 |
---|---|
📌 [PostgreSQL] VARCHAR vs TEXT 차이점과 최적의 사용법 (0) | 2025.02.17 |
[PostgreSQL] character varying 와 varchar 차이점 (0) | 2020.07.14 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- AI혁신
- 스프링
- jakartaee10
- 인공지능
- Ai
- db설계
- 코딩
- 레코드패턴
- 클린코드
- varchar
- 피싱공격
- springboot3
- 게임추천
- postgresql튜닝
- pc게임
- GraalVM
- 국정원경고
- springboot최신기능
- 개발자
- Java21
- PostgreSQL
- XBOXSERIESX
- java17
- 프로그래밍
- 백엔드
- 스프링부트
- virtualthreads
- SQL
- java
- springsecurity6
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
글 보관함