일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 단축키
- Mac
- profile
- tomcat
- Windows
- plugin
- 줄바꿈 문자
- netsh
- web.xml
- find
- import
- bash
- JavaScript
- Windows 10
- grep
- Source
- VirtualBox
- IntelliJ
- resource
- maVen
- Quartz
- xargs
- ssh
- context
- vscode
- Eclipse
- port
- 네트워크
- lsof
- GIT
- Today
- Total
목록DB/MySQL (35)
develog
에러)Exception in thread "main" java.sql.SQLException: Column 'COL_NM' not found. 해결)JDBC 커넥션 맺을때 아래 옵션 추가useOldAliasMetadataBehavior=true
위 에러 발생시 아래 처럼 사용CONVERT(COL_NM USING UTF8)
SHOW CHARACTER SET; SHOW CHARACTER SET LIKE '%euc%'; SHOW CHARACTER SET LIKE '%utf%'; SHOW CHARACTER SET WHERE CHARSET LIKE '%euc%' OR CHARSET LIKE '%utf%'; SHOW COLLATION; SHOW COLLATION LIKE '%euc%'; SHOW COLLATION LIKE '%utf%'; SHOW COLLATION WHERE CHARSET LIKE '%euc%' OR CHARSET LIKE '%utf%';
- TEST1 테이블의 Primary Key 컬럼명은 SEQ- SEQ 컬럼은 AUTO_INCREMENT 사용중 - iBatis INSERT INTO TEST1 (TITLE) VALUES (#TITLE#) SELECT LAST_INSERT_ID() - JavaMap map = new HashMap();map.put("TITLE", title); int insertId = (Integer) sqlMapClient.insert("TestMap.insTest", map);System.out.println("insertId : " + insertId);
CREATE TABLE TEST1 ( SEQ INTEGER PRIMARY KEY AUTO_INCREMENT , TITLE VARCHAR(100) ) ENGINE INNODB ; CREATE TABLE TEST2 ( SEQ INTEGER PRIMARY KEY AUTO_INCREMENT , TITLE VARCHAR(100) ) ENGINE INNODB ; ALTER TABLE TEST1 ENGINE INNODB; ALTER TABLE TEST2 ENGINE INNODB; START TRANSACTION; INSERT INTO TEST1 (TITLE) VALUES ('11'); INSERT INTO TEST1 (TITLE) VALUES ('22'); INSERT INTO TEST2 (TITLE) VALUES ..