SQL
MySQL FIND_IN_SET() 쉼표로 구분된 문자열 내 특정 값 찾기
MySQL은 쉼표(,)로 구분된 문자열 내 특정 값이 있는지 여부를 확인할 수 있는 FIND_IN_SET 함수가 있다. 다음과 같은 두 예시 테이블과,데이터가 있다고 했을 때 users 테이블 user_id user_name email is_active 1 user1 user1@example.com 1 (활성화) 2 user2 user2@example.com 1 (활성화) 3 user3 user3@example.com 0 (비활성화) posts 테이블 post_id author_id title content tags create_at 1 1 post_1 Content of post 1 mysql, database 2022-01-01 12:00:00 2 1 post_2 Content of post 2 ph..
2023. 3. 26. 18:18
최근댓글