DB
-
[Postgresql] $$ 의미DB/PostgreSQL 2020. 8. 10. 14:25
CREATE OR REPLACE FUNCTION increment(i integer) RETURNS integer AS $$ BEGIN RETURN i + 1; END; $$ LANGUAGE plpgsql; Dollar-Quoted String Constants - 함수 정의의 시작과 끝을 알려주는 기호 ** https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-DOLLAR-QUOTING ** https://stackoverflow.com/questions/31285366/what-does-the-mean-in-postgresql-function
-
[DB]DB 2020. 6. 15. 15:12
: 일정한 형태로 데이터를 저장한 것. ★ DBMS : 데이터를 관리하는 소프트웨어. 무결성보장. ★ RDBM : 관계성 DB ★ SQL : 정제된 언어 ================================================================ DDL - 데이터 정의어. 데이터 구조 생성, 변경, 제거 DML - 데이터 조작어. 데이터 생성,변경,제거 DCL - 데이터 제어어. DB에 접근, 권환 부여/회수. TCL - 트랜잭션 제어어. 논리적 작업단위를 제어 ================================================================ #. 테이블 스페이스 [ 테이블 { 로우 ( 레코드- 한 줄(필드-한 칸) ) }] ★ 테이블 - 데이터 ..
-
[Oracle] basicDB/Oracle 2020. 3. 22. 15:00
# nologin sqlplus /nolog # sys login sqlplus "/as sysdba" # change password after login alter user USERNAME identified by NEW_PW # select * from dba_users https://docs.oracle.com/cd/B19306_01/server.102/b14237/statviews_4174.htm#REFRN23302 DBA_USERS DBA_USERS DBA_USERS describes all users of the database. Related View USER_USERS describes the current user. This view does not display the PASSWORD..
-
The server time zone value ‘KST’ is unrecognized or represents more than one time zone.DB/MySQL 2019. 12. 5. 11:43
# The server time zone value 'KST' is unrecognized or represents more than one time zone # My SQL 5.1.X 이후 버전부터 KST 타임존을 인식하지 못함 ## jdbc:mysql://${MYSQL_HOST:localhost}:3306/db_example?characterEncoding=UTF-8&serverTimezone=UTC
-
[Oracle] sum() over()DB/Oracle 2019. 9. 5. 03:36
[배경] over() 내 order by 구문으로 결과가 다르게 나타난다 WITH t AS ( SELECT '20150801' dt, 1 id FROM dual UNION ALL SELECT '20150801', 2 FROM dual UNION ALL SELECT '20150801', 1 FROM dual UNION ALL SELECT '20150802', 1 FROM dual UNION ALL SELECT '20150802', 2 FROM dual UNION ALL SELECT '20150802', 2 FROM dual UNION ALL SELECT '20150803', 3 FROM dual UNION ALL SELECT '20150804', 4 FROM dual UNION ALL SELECT '201..