반응형
질문은 이러하다...
나는 oracle 배웠으니까 oracle로 풀었는데, 계속 오류가 나길래 확인해보니,
언어를 mysql로 풀고 있었다.
select * from (select * from animal_ins order by datetime desc) where rownum <=1;
이렇게 적어놓고, 계속 답이 틀렸다고 해서 또 한번 멘붕..
사실 정답은,
select datetime from (select * from animal_ins order by datetime desc) where rownum <=1;
이렇게 딱 '시간' 만 구해야 한다.
반응형
'SOFTWARE > ALGORITHM' 카테고리의 다른 글
[codewars] Is a number prime? - 소수인 숫자 찾기 (0) | 2020.02.17 |
---|---|
[codewars] Sum of odd numbers (0) | 2020.02.16 |
[codewars] A square of squares - 제곱수 구하기! (0) | 2020.02.15 |
[codewars] Isograms - 문자열 비교하기 (0) | 2020.02.14 |
[codewars] Disemvowel Trolls 풀기! (일부 문자열 제거하기) (0) | 2020.02.13 |
댓글