Notice
Recent Posts
Recent Comments
Link
- Arawn's Dev Blog
- Outsider's Dev Story
- Toby's Epril
- Benelog
- NHN 개발자 블로그
- SK 플래닛 기술 블로그
- OLC CENTER
- 소프트웨어 경영/공학 블로그
- 모바일 컨버전스
- KOSR - Korea Operating System …
- 넥스트리 블로그
- 리버스코어 ReverseCore
- SLiPP
- 개발자를 위하여... (Nextree 임병인 수석)
- "트위터 부트스트랩: 디자이너도 놀라워할 매끈하고 직관…
- Learning English - The English…
- real-english.com
- 'DataScience/Deep Learning' 카테…
- Deep Learning Summer School, M…
- Deep Learning Courses
민서네집
[MySQL] Binary Data 넣기 본문
Insert hex values into MySql
stackoverflow.com/questions/3126210/insert-hex-values-into-mysql
You can use UNHEX() function to convert a hexstring with hex pairs to binary and HEX() to do the other way round.
I.e.
INSERT INTO tbl (col) VALUES (UNHEX('4D2AFF'))and
SELECT HEX(col) FROM tblCREATE TABLE IF NOT EXISTS `TEST_TBL` (
`totalCount` VARBINARY(500) ,
`useCount` VARBINARY(500)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='테스트 테이블';
INSERT INTO TEST_TBL VALUES(UNHEX('4D2AFF00OBODOA'),UNHEX('4D2AFF00OBODOA'));
COMMIT;
'Database > MySQL' 카테고리의 다른 글
| MySQL DB/User 생성 및 권한 추가 (0) | 2014.10.22 |
|---|---|
| Windows Command 창에서 mysql 실행시키기 (0) | 2014.08.20 |
| Cent OS 6.4, MySQL 기본 인코딩 변경하기 (0) | 2013.12.04 |
| Virtual Box 에서 CentOS 설치 후 MySQL 설치 / Virtual Box - Guest 확장 설치 (0) | 2013.11.19 |
| Windows 에서 MySQL port 변경. (2) | 2013.11.19 |
Comments