절대값을 계산할 때는 ABS함수를 사용한다. 예를 들어, -2와 +2 라는 값을 + 연산을 하게 되면, 0이지만, 이 두 값 간의 차이값.. 즉 절대값을 구해야할 때가 있다. 두 지점의 거리라든지... 그런 경우엔 ABS함수를 활용할 수 있다. CREATE TABLE location1 ( x1 integer , x2 integer ); INSERT INTO location1 VALUES ( 5 , 10) , (10 , 5) , (-2 , 4) , ( 3 , 3) , ( 0 , 1) ; select ABS(x1 - x2) as 절대값 from location1; 결과는 아래와 같다.
-- column comment조회 SELECT PS.RELNAME AS TABLE_NAME ,PA.ATTNAME AS COLUMN_NAME ,PD.DESCRIPTION AS COLUMN_COMMENT FROM PG_STAT_ALL_TABLES PS ,PG_DESCRIPTION PD ,PG_ATTRIBUTE PA WHERE PS.SCHEMANAME = 'wam' --AND PS.RELNAME = 'am_asst' AND PS.RELID = PD.OBJOID AND PD.OBJSUBID 0 AND PD.OBJOID = PA.ATTRELID AND PD.OBJSUBID = PA.ATTNUM ORDER BY PS.RELNAME, PD.OBJSUBID -- table comment 조회 SELECT C.RELN..
update t_am_asst as t set worktype_cd = tcc.cd from t_cm_code tcc, t_am_asst_fclty taaf where tcc.cd_nm = taaf.worktype_nm and tcc.grp_cd = 'WTYPE' and t.asst_sn = taaf.asst_sn set에 t.worktype.cd라고 쓰면 다음 에러가 발생한다. t.을 제거하고 하면 잘 실행된다. ERROR: 오류: "t" 칼럼은 "t_am_asst" 릴레이션(relation)에 없음 LINE 2: set t.worktype_cd = tcc.cd
jdbc.postgresql.org/download.html PostgreSQL JDBC Download Download About Binary JAR file downloads of the JDBC driver are available here and the current version with Maven Repository. Because Java is platform neutral, it is a simple process of just downloading the appropriate JAR file and dropping it into your cl jdbc.postgresql.org 위 사이트에서 jdbc로 검색 후 다운로드 다음 경로에 저장 C:\Users\user\workspace\post..
- Total
- Today
- Yesterday
- springboot
- draw.io
- excel
- Javascript
- 정규식
- 여러 컬럼 update
- object key
- QueryDSL
- lombok
- @ExceptionHandler
- sumifs
- CSS
- $.each
- 프로젝트명변경
- 전후방탐색
- spring
- element위치
- PostgreSQL
- Keycode
- devtools
- ul li로 테이블
- caniuse
- getter
- setter
- DatePicker
- oracle
- border-collapse
- $.extend
- 진열사랑
- JQuery
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |