SQL 문제풀이

이상해씨·2024년 3월 5일
0

문제

Query a list of CITY names from STATION for cities that have an even ID number. Print the results in any order, but exclude duplicates from the answer.
The STATION table is described as follows:

where LAT_N is the northern latitude and LONG_W is the western longitude.

나의 코드

select DISTINCT CITY from STATION
where ID % 2=0

다른 방법

select DISTINCT CITY from STATION
where MOD(ID,2)=0

참고

profile
공부에는 끝이 없다

0개의 댓글