
다음과 같은 [퀴즈]를 복습하고 있습니다.
--> Gmail을 사용하는 2020/07/12~13에 가입한 유저를 추출하기.
전 다음과 같이 쿼리 문을 작성했습니다.
select * from users
where email like="%gmail.com"
and created_at between "2020-07-12" and "2020-07-13"
근데 에러가 나고 답안을 보면 다음과 같이 되어있네요
select * from users
where created_at between "2020-07-12" and "2020-07-13"
and email like "%gmail.com";
(위의 2개는 다른 경우인가요?) (순서가 바뀌면 안되나요?)
근데 지금 두번째 답안 쿼리를 실행 했는데도 다음과 같은 에러가 나오네요.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '="%gmail.com"
and created_at between "2020-07-12" and "2020-07-13"' at line 2
이게 어떻게 된거죠?
제가 작성한 것, 답안... 둘 다 에러가 납니다.
