[ DB2 ] 스키마 내 테이블과 칼럼 정보 조회 SELECT TABLE_NAME, COLUMN_NAME, ORDINAL_POSITION, DATA_TYPE, LENGTH, NUMERIC_SCALE, IS_NULLABLE, COLUMN_DEFAULT, COLUMN_HEADING, COLUMN_TEXT AS COMMENTFROM QSYS2.SYSCOLUMNSWHERE TABLE_SCHEMA = '스키마명'ORDER BY TABLE_NAME, ORDINAL_POSITION; DB/DB2 HEON.D 2025.04.30
[ DB2 ] DB2 버전 유형 🔍 버전 비교 요약표항목LUWz/OSiSeries (AS/400)대상 OSLinux, Unix, Windowsz/OS (메인프레임)IBM i (AS/400)사용 목적범용 애플리케이션 DB초대형 금융, 공공기관ERP/제조시스템, 중소기업용 DBSQL 호환성높음 (ANSI SQL + 확장)전통 SQL + 고속처리 기능SQL + DDS 기반 혼용시스템 카탈로그SYSCAT, SYSIBM, SYSSTATSYSIBM.*QSYS2.*가장 일반적인 용도웹/서버 백엔드 DB대형 배치 시스템전통 ERP 및 커스텀 시스템 🧭 1. DB2 LUW (Linux, Unix, Windows)항목설명🖥️ 플랫폼Linux, AIX, Windows 등 일반 서버 OS📚 사용처대부분의 기업용 웹/서버 애플리케이션에 사용📦 설치 .. DB/DB2 HEON.D 2025.04.30
[ DB2 ] DB2 칼럼 자료크기 지정안하였을 때의 기본값 VALUES CURRENT SCHEMA;VARCHAR -> 32,627LONG VARCHAR -> 16,320INTEGER -> 10 DB/DB2 HEON.D 2025.01.08
[ DB2 ] 시작키 지정 https://www.ibm.com/docs/en/db2-warehouse?topic=concepts-auto-numbering-identifier-columns Auto numbering and identifier columns An identity column provides a way for Db2® to automatically generate a unique numeric value for each row that is added to the table. When creating a table in which you must uniquely identify each row that will be added to the table, you can add an identit www.ibm.com 시.. DB/DB2 HEON.D 2023.11.27
[ DB2 ] AutoIncrement 칼럼 복사 가능설정 https://knowledge.informatica.com/s/article/148682?language=en_US DB/DB2 HEON.D 2023.11.27
[ DB2 ] DB2 칼럼 변경 안될 때 테이블 교체 1. 새 테이블 생성 create table NEW_TABLE ( IC_CODE INTEGER generated always as identity primary key, IC_CONTENT VARCHAR(50), IC_TYPE VARCHAR(10), USEYN VARCHAR(1) default 'Y', REGDT TIMESTAMP(6) default CURRENT TIMESTAMP not null, REGID VARCHAR(10), UPDDT timestamp not null generated always for each row on update as row change timestamp, UPDID VARCHAR(10) ); 2. 데이터 복제 insert into NEW_TABLE ( NEW_COLUM.. DB/DB2 HEON.D 2023.10.02
[ DB2 ] AS400 드라이버 Drop column 권한 설정 CALL QSYS2.QCMDEXC('ADDRPYLE SEQNBR(1500) MSGID(CPA32B2) RPY(''I'')'); CALL QSYS2.QCMDEXC('CHGJOB INQMSGRPY(*SYSRPYL)'); https://stackoverflow.com/questions/4504548/db2-400-drop-column DB2 400 drop column I want to drop a column called id which is an auto incrementing PK. The SQL: alter table "CO88GT"."XGLCTL" drop column id cascade; And I get: Error: [SQL0952] Processing of the SQL statement e... DB/DB2 HEON.D 2023.09.15
[ DB2 ] Timezone 확인 select current timestamp as local, current timezone as timezone, current timestamp - current timezone as UTC from sysibm.sysdummy1 DB/DB2 HEON.D 2023.08.07