Mysql - ORDER by 정렬 한가지 팁
특정 테이블의 필드 "field" 에 값이 "A","B","C","D"와 같이 들어가있는 경우 "A","C","D","B"와 같이 정렬 하기 위한때.. SELECT * FROM table WHERE ........ ORDER by case when (type = 'A') then 1 when (type = 'C') then 2 when (type = 'D') then 3 when (type = 'B') then 4 end, another_field DESC 로 활용...
데이타베이스/Mysql
2008. 6. 22. 14:44
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크