This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | SELECT | |
| LENGTHB('ABCD') AS LENGTHB -- 문자열 byte 수(결괏값 : 4) | |
| , VSIZE('ABCD') AS VSIZE_STRING -- expression byte 수(결괏값 : 4) | |
| , VSIZE(12345) AS VSIZE_NUMBER -- expression이 숫자일 경우 (자릿수 / 2) + 1의 결과를 반올림(결괏값 : 4) | |
| , LENGTH('ABCD') AS LENGTH -- 글자 수(결괏값 : 4) | |
| FROM | |
| DUAL; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /* 상용에서 VIEW 제공이 아직 안 됐을 경우, 페이지 내에 있는 테이블에 '검색 결과가 없습니다.'를 | |
| 출력하기 위해 로컬에서 테스트 했던 SQL은 주석처리하고 아래 SQL로 임시 대체 */ | |
| SELECT 1 FROM DUAL WHERE 0 = NULL; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| </head> | |
| <body> | |
| <%-- JSTL alert --%> | |
| <c:out value="<script type='text/javascript'>alert('${param.value}');</script>" escapeXml="false" /> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | -- 분양 당첨(분양 신청자 수가 집 개수보다 많을 경우 집 하나에 당첨자가 무조건 배정된다는 조건) | |
| -- EACH_HOUSE_INFO : 집 정보 테이블(집들은 특정 그룹에 속함) | |
| -- PEOPLE_WAITING_FOR_WINING : 추첨되길 기다리는 사람들 테이블 | |
| SELECT | |
| EHI.HOUSE_KEY_ID | |
| , CAST(SUBSTRING(EHI.HOUSE_KEY_ID, 4) AS INTEGER) AS STONE_NO | |
| , PWFW.PERSON_KEY | |
| , ROW_NUMBER() OVER(PARTITION BY EHI.HOUSE_KEY_ID ORDER BY EHI.HOUSE_KEY_ID) AS WINNER_RANK | |
| , CASE | |
| WHEN ROW_NUMBER() OVER(PARTITION BY EHI.HOUSE_KEY_ID ORDER BY EHI.HOUSE_KEY_ID) = 1 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | SELECT TO_NUMBER(TO_CHAR(SYSDATE, 'YYYY')) AS RECENT_3YEARS FROM DUAL | |
| UNION ALL | |
| SELECT (TO_NUMBER(TO_CHAR(SYSDATE, 'YYYY')) - 1) AS RECENT_3YEARS FROM DUAL | |
| UNION ALL | |
| SELECT (TO_NUMBER(TO_CHAR(SYSDATE, 'YYYY')) - 2) AS RECENT_3YEARS FROM DUAL; | |
| -- TO_NUMBER 제거 시 아래와 같이 작성 필요(UNION ALL 사용 시 대응하는 식들은 데이터 유형 같아야 함) | |
| SELECT (TO_CHAR(SYSDATE, 'YYYY') - 0) AS DIF_YEAR FROM DUAL | |
| UNION ALL | |
| SELECT (TO_CHAR(SYSDATE, 'YYYY') - 1) AS DIF_YEAR FROM DUAL | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | SELECT | |
| LEVEL AS RECENT_3YEARS | |
| FROM | |
| DUAL | |
| WHERE | |
| LEVEL > TO_CHAR(SYSDATE, 'YYYY') -3 | |
| CONNECT BY | |
| LEVEL <= TO_CHAR(SYSDATE, 'YYYY') | |
| ORDER BY | |
| LEVEL DESC; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | SELECT | |
| UC.TABLE_NAME | |
| , UCC.COLUMN_NAME | |
| , UC.CONSTRAINT_TYPE | |
| FROM | |
| USER_CONSTRAINTS UC | |
| INNER JOIN USER_CONS_COLUMNS UCC | |
| ON UCC.CONSTRAINT_NAME = UC.CONSTRAINT_NAME; | |
| -- CONSTRAINT_TYPE(제약 조건 종류) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // Excel 다운로드 시 row에 데이터가 많을 경우 에러 발생하여 3개로 분리 | |
| List<Map<String, Object>> dataList = new ArrayList<Map<String, Object>>(); | |
| List<Map<String, Object>> dataList1 = new ArrayList<Map<String, Object>>(); | |
| List<Map<String, Object>> dataList2 = new ArrayList<Map<String, Object>>(); | |
| List<Map<String, Object>> dataList3 = new ArrayList<Map<String, Object>>(); | |
| dataList1 = diagDao.selectDataA(params); // 정보 a 가져오기 | |
| dataList2 = diagDao.selectDataB(params); // 정보 b 가져오기 | |
| dataList3 = diagDao.selectDataC(params); // 정보 c 가져오기 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <!DOCTYPE html> | |
| <html> | |
| <head> | |
| </head> | |
| <body> | |
| <ul class="ad_showTab"> | |
| <li> | |
| <a class="on" onclick="fnGetScholarDivCtrl('enterTab');" href="javascript:void(0);">신입학</a> | |
| </li> | |
| <li> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | let fruit_list = ['귤', '배', '포도', '사과', '사과', '포도', '포도']; | |
| let podo_list = fruit_list.filter((element) => { | |
| return element == '포도'; | |
| }); | |
| console.log(podo_list); |