where절 | Where은 SELECTION σ 와 같은 역할 함, 만족해야 하는 조건을 나타냄 where에는 and, or, not 사용해 연결 가능 where에는 비교 연산자들(<, <=, >, >=, =, <>) 사용 가능 |
from절 | From은 카티션 곱 X 과 같음, 쿼리에 포함할 relation들을 열거함. 여러 relation이면 모두 짝짓기, 같은 컬럼명은 앞에 relation 이름을 붙인다 Q) find names of all instructors in the Art department who have taught some course and the course_id => select name, course_id from instructor, teaches where instructor.ID = teaches.ID and instructor.dept_name = ‘Art’ //굳이 instructor 안붙여도 dept_name은 여기밖에 없음 |
'데이터베이스설계' 카테고리의 다른 글
[데이터베이스설계] 3-4 튜플 정렬, where절 술부 (0) | 2024.11.23 |
---|---|
[데이터베이스설계] 3-3 rename 연산, string 연산 (0) | 2024.11.22 |
[데이터베이스설계] 3-1 기본 쿼리 구조, select절 (1) | 2024.11.20 |
[데이터베이스설계] 2-10 활용 문제들 (0) | 2024.11.19 |
[데이터베이스설계] 2-9 세타조인, 자연조인, 디비전 연산자 ÷ (0) | 2024.11.18 |