2
초보자 질문에 대해 유감스럽게 생각합니다.이 두 연산자가 MySQL에서 동일하다는 것을 알고 있습니까?Mysql과 인덱스의 두 열에 대한 고유 제한
ALTER TABLE friends ADD CONSTRAINT UNIQUE (`user_id`, `friend_id`);
및
CREATE UNIQUE INDEX friends_user_friend ON friends (user_id, friend_id);