일단 해봐! 해보고 오류 뜨면 그때 고치면 된다!!
5분이 되고 10분이 되고 한시간이 걸려도 내 힘으로 해보기
Select 쿼리문
데이터베이스에서 데이터를 선택해서 가져오는 것
WHERE 절
Select 쿼리문으로 가져올 데이터에 조건을 걸어주는 것
select * from orders
where = ""
select * from orders
where payment_method = "kakaopay";
and
쓰기select * from orders
where course_title = "앱개발 종합반" and payment_method = "kakaopay";
!=
select * from orders
where course_title != "웹개발 종합반";
between
과 and
를 쓴다select * from orders
where created_at between "2020-07-13" and "2020-07-15";
in ( , )
select * from checkins
where week in (1, 3);
'%daum'
을 쓴다%daum%
도 가능select * from users
where email like '%daum.net';
limit 개수
select * from orders
where payment_method = "kakaopay"
limit 5;
distinct(제외내용)
select distinct(payment_method) from orders;
count()
select count(*) from orders
count(distinct(제외내용))
SELECT count(distinct(name)) from users;