Monday, October 2, 2023

ORDER BY in SQL

 

Cú pháp câu lệnh:
 
SELECT column1, column2, ...
FROM table_name
ORDER BY column1, column2, ... ASC|DESC;

Giải thích: ORDER BY dùng để sắp xếp dữ liệu trả về theo cột nào