공부/Oracle

oracle 잘 까먹는 기본 기능

cldy 2018. 6. 19. 19:08

[1] DB 데이터를 정렬하고 싶다면?

ORDER BY : 기본이 ASC (오름차순)  / DESC (내림차순)

select * from board
where writer = #{email} order by num        //오름차순

     where writer = #{email} order by num DESC    //내림차순