You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT Q.*FROM question AS Q
WHEREQ.subjectLIKE'%sbb%';
2. 질문 제목 + 내용 검색
SELECT Q.*FROM question AS Q
WHEREQ.subjectLIKE'%sbb%'ORQ.contentLIKE'%sbb%';
3. 질문 제목 + 내용 검색 + 작성자
SELECT Q.*FROM question AS Q
LEFT JOIN site_user AS SU
ONQ.author_id=SU.idWHERE (
Q.subjectLIKE'%user1%'ORQ.contentLIKE'%user1%'ORSU.usernameLIKE'%user1%'
);
4. 질문 제목 + 내용 검색 + 작성자 + 답변 내용
SELECT Q.*FROM question AS Q
INNER JOIN site_user AS SU
ONQ.author_id=SU.idLEFT JOIN answer AS A
ONQ.id=A.question_idWHERE (
Q.subjectLIKE'%sbb는 질문답변 게시판입니다.%'ORQ.contentLIKE'%sbb는 질문답변 게시판입니다.%'ORSU.usernameLIKE'%sbb는 질문답변 게시판입니다.%'ORA.contentLIKE'%sbb는 질문답변 게시판입니다.%'
)
GROUP BYQ.id;