Regexp
-
MySQL/정규식 검색DBMS/MySql (MariaDB) 2022. 9. 19. 09:52
temp table rows WITH t_temp AS ( SELECT '1' AS test_type, '가나다123' AS test_name UNION ALL SELECT '1,2,3', '23' UNION ALL SELECT '1,3', '12나다4' UNION ALL SELECT '1,2,3,4', '32가다123' UNION ALL SELECT '1,6', '다123' UNION ALL SELECT '2,5,6', '한글만있음' ) LIKE 검색 레코드 temp_type 필드의 '1'을 포함한 레코드 출력 - 기본 WITH t_temp AS ( ... ) SELECT xxx.* FROM t_temp AS xxx WHERE xxx.temp_type LIKE '%1%' - 정규식 WITH t_temp..
-
MySQL/한글, 영문, 숫자, 특문 정렬방식DBMS/MySql (MariaDB) 2021. 3. 17. 10:22
프로젝트에서 필요한 부분이 있어서, 샘플로 만들어 보았습니다. WITH t_temp AS ( SELECT 1 AS product_name UNION ALL SELECT '&_@' UNION ALL SELECT 'B%#$' UNION ALL SELECT 'a%#$' UNION ALL SELECT '^SA' UNION ALL SELECT '남dsfa$%' UNION ALL SELECT '강2f23bvc43' UNION ALL SELECT '뷁2f23bvc43' UNION ALL SELECT '뷁1f23bvc43' UNION ALL SELECT '뷁11f23bvc43' UNION ALL SELECT '뷁3f23bvc43' ) SELECT xxx.product_name, ASCII(SUBSTRING(xxx.pr..