Yondata
728x90
반응형

 

<bash />
--DDL CREATE TABLE basic_data_types_table ( smallint_col SMALLINT, -- 작은 범위의 정수 integer_col INTEGER, -- 정수 bigint_col BIGINT, -- 큰 범위의 정수 decimal_col DECIMAL(10, 2), -- 고정 소수점 숫자 numeric_col NUMERIC(12, 4), -- 고정 소수점 숫자 (DECIMAL과 동일) real_col REAL, -- 4바이트 부동 소수점 숫자 double_col DOUBLE PRECISION, -- 8바이트 부동 소수점 숫자 char_col CHAR(10), -- 고정 길이 문자열 varchar_col VARCHAR(50), -- 가변 길이 문자열 text_col TEXT, -- 길이 제한 없는 문자열 created_date DATE, -- 날짜 (연도, 월, 일) created_time TIME, -- 시간 (시, 분, 초) created_timestamp TIMESTAMP, -- 날짜와 시간 created_timestamptz TIMESTAMPTZ, -- 시간대가 포함된 날짜와 시간 boolean_col BOOLEAN -- 참/거짓 (TRUE/FALSE) ); --INSERT INSERT INTO basic_data_types_table ( smallint_col, integer_col, bigint_col, decimal_col, numeric_col, real_col, double_col, char_col, varchar_col, text_col, created_date, created_time, created_timestamp, created_timestamptz, boolean_col ) VALUES ( 10, 1000, 100000, 1234.56, 9876.5432, 1.23, 4.56789, 'A', 'Hello, World!', 'This is a long text.', '2024-10-22', '14:30:00', '2024-10-22 14:30:00', '2024-10-22 14:30:00+09', TRUE ); commit;

 

728x90
반응형
profile

Yondata

@Yondata

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!