# 2.9. Cấu hình sắp xếp (ORDER) hiển thị dữ liệu

Mục tiêu: Sử dụng để sắp xếp các hàng (bản ghi) trả về từ một truy vấn theo một hoặc nhiều cột. Thực hiện trên hệ thống theo các bước hướng dẫn sau:

<span style="mso-fareast-font-family: 'Times New Roman';"><span style="mso-list: Ignore;">-<span style="font: 7.0pt 'Times New Roman';"> </span></span></span>Bước 1: Tại tập dữ liệu cột/trường dữ liệu cần sắp xếp

<span style="mso-no-proof: yes;">![](https://book.inetcloud.vn/uploads/images/gallery/2024-07/embedded-image-rgtyhrqf.png)  
</span>

<span style="mso-fareast-font-family: 'Times New Roman';"><span style="mso-list: Ignore;">-<span style="font: 7.0pt 'Times New Roman';"> </span></span></span>Bước 2: Chọn hướng sắp xếp dữ liệu

<span style="mso-no-proof: yes;">![](https://book.inetcloud.vn/uploads/images/gallery/2024-07/embedded-image-5k3jygr2.png)  
</span>

<span style="mso-tab-count: 1;"> </span>Trong đó:

<span style="font-family: 'Courier New'; mso-fareast-font-family: 'Courier New';"><span style="mso-list: Ignore;">o<span style="font: 7.0pt 'Times New Roman';"> </span></span></span>ASC (Ascending): Thứ tự tăng dần

<span style="font-family: 'Courier New'; mso-fareast-font-family: 'Courier New';"><span style="mso-list: Ignore;">o<span style="font: 7.0pt 'Times New Roman';"> </span></span></span>**DESC (Descending)**: Thứ tự giảm dần.

<span style="mso-fareast-font-family: 'Times New Roman';"><span style="mso-list: Ignore;">-<span style="font: 7.0pt 'Times New Roman';"> </span></span></span>Bước 3: Ấn TEST để xem kết quả dữ liệu

<span style="mso-no-proof: yes;">![](https://book.inetcloud.vn/uploads/images/gallery/2024-07/embedded-image-z7lzx5ug.png)  
</span>

<span style="mso-no-proof: yes;">***Lưu ý:*** *Để hiểu rõ hơn về các biểu thức có thể tham khảo thêm ở tài liệu này [https://book.inetcloud.vn/books/tai-lieu-su-dung-cloud-query/page/26-order-by](https://book.inetcloud.vn/books/tai-lieu-su-dung-cloud-query/page/26-order-by)*</span>