謝晒的PHP網頁設計
聯絡E-mail:
sean0704@gmail.com
站內搜尋
Wednesday, February 13, 2013
[MYSQL] 排序"ORDER BY"
"ORDER BY"要放在最後,可以有第一順位、第二順位...
SELECT *FROM mytable ORDER BY name,phone
排序預設是"升冪",如果在結尾加上DESC則是"降冪"(大到小)
SELECT *FROM mytable ORDER BY name DESC
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment