죽을때까지 공부/sql2 sql 문법정리 where- 데이터에 조건을 걸어준다 select * from orders where payment_method = "kakaopay"; order 테이블에서 payment_methpd가 카카오페이인 것만 가져와라. '같지 않음' 조건은 != 로 걸 수 있습니다. select * from orders where course_title != "웹개발 종합반"; 범위' 조건은 between select * from orders where created_at between "2020-07-13" and "2020-07-15"; 포함' 조건은 in 으로 걸 수 있어요. select * from checkins where week in (1, 3); 패턴' 조건은 like select * from users wh.. 2023. 4. 8. SQL 개발일지 -1 SQL은 방대한 데이터중에서 필요한 정보만을 가져올 수 있는 아주 좋은 프로그램이다. 1. show- 보여준다. 2. select * from table- 해당 테이블의 전체 필드를 보여준다. 3. where 필드- 해당 데이터에 조건을 걸어준다. 4. != 같지 않음 select * from orders where course_title != "웹개발 종합반"; 웹개발 종합반 이외에 데이터가 추출된다. 5.범위조건-between and select * from orders where created_at between "2020-07-13" and "2020-07-15"; 6.포함조건 in ( ) select * from checkins where week in (1, 3); 7.포함 문자열 select.. 2023. 3. 29. 이전 1 다음