Mysql vo 만들기
1. vo 만들기 SELECT #CONCAT(COL,',')AS '' CONCAT('private ', CASE WHEN DATA_TYPE = 'timestamp' THEN 'Timestamp ' ELSE 'String ' END, GENERATOR_COL,';' , ' //' , IFNULL(COLUMN_COMMENT, ''))AS '' #CONCAT('#{', GENERATOR_COL,'},')AS '' FROM ( SELECT COL, CASE WHEN COL1 ='' THEN '_id' ELSE CONCAT(LOWER(COL1),UPPER(SUBSTR(COL2, 1, 1)),LOWER(SUBSTR(COL2, 2)),UPPER(SUBSTR(COL3, 1, 1)),LOWER(SUBSTR(COL3, 2..
2020. 8. 15.
테이블로 VO, Insert, Update문 만들기
1. VO 만들기 --VO 만들기 select 'private String ' || lower(SUBSTR(a.COLUMN_NAME, 1,1))||SUBSTR(replace(INITCAP(lower(a.COLUMN_NAME)), '_',''), 2) || ' = "";' || ' //' || NVL(b.COMMENTS, '') as 빈소스 FROM USER_TAB_COLS a , USER_COL_COMMENTS b WHERE a.TABLE_NAME = b.TABLE_NAME and a.COLUMN_NAME = b.COLUMN_NAME AND a.TABLE_NAME=upper('TB_BOARD'); 2. SELECT --SELECT 만들기 select decode(rownum, 1, 'SELECT ' ||..
2020. 8. 13.