본문 바로가기

DB/DB2

DB2 DATE FORMAT VARCHAR_FORMAT 스칼라 함수 ref: http://www.ibm.com/support/knowledgecenter/ko/SSEPGG_9.7.0/com.ibm.db2.luw.sql.ref.doc/doc/r0007110.html문자를 varchar로 >>-VARCHAR_FORMAT--(--character-expression--)------------------>>-VARCHAR_FORMAT--(--timestamp-expression--+--------------------------------------+--)->>.. 더보기
DB2 함수 모음 db2 함수 정리=> 기본정보보기 DESCRIBE TABLE table-name [show detail] DESCRIBE SELECT * FROM tablename; => 인덱스 정보보기 DESCRIBE INDEXES FOR TABLE table-name [show detail] => 등록 테이블 리스트 보기 LIST TABLES FOR ALL ; => LOCK 상태 확인 GET SNAPSHOT FOR LOCKS ON depsdb 유지되는 잠금, 현재 잠금대기중인 에이전트, 응용프로그램명, 응용프로그램 상태, 총대기시간, 모드상태 등을 확인 SELECT * FROM staff FETCH FIRST 5 ROWS ONLY라고 하면 하면 처음 5개의 row가 나옵니다. SELECT bus_mkt_id, svc.. 더보기
DB2 SQL error codes SQL error codesuse CTRL + F to find code you want SQL return codes that are preceded by a minus sign (-) indicate that the SQL statement execution was unsuccessful.-007 STATEMENT CONTAINS THE ILLEGAL CHARACTER invalid-character-010 THE STRING CONSTANT BEGINNING string IS NOT TERMINATED-011 COMMENT NOT CLOSED-029 INTO CLAUSE REQUIRED-051 identifier-name (sql-type) WAS PREVIOUSLY DECLARED OR REFER.. 더보기
DB2 Data Type Java Mapping Data types that map to database data types in Java applicationsTo write efficient JDBC and SQLJ programs, you need to use the best mappings between Java™ data types and table column data types.The following tables summarize the mappings of Java data types to JDBC and database data types for a DB2® for Linux, UNIX, and Windows, DB2 for z/OS®, or IBM® Informix® system.Data types for updating table.. 더보기