Thread: sort by lowest decimal value

1. sort by lowest decimal value

hi,

i have a decimal(10,2) field. i want to sort my results accordin to the lowest decimal value. for example:
25.00
25.50
26.00

so i have this query:
PHP Code:
``` SELECT Price, PromotionalOffer, Website, Borough, MoreInfo, BusinessName FROM client_boroughs JOIN client ON client_boroughs.idClient=client.idClient WHERE Borough ='Southwark' order by (Price) ASC;  ```
so i am using order by (price) ASC to do this and it works, but is this the right way of doing this? is there a scenario where this could fail? should i be using somesort of math function to do this?

2. Originally Posted by ma201dq
so i am using order by (price) ASC to do this and it works, but is this the right way of doing this?
I'd use ORDER BY price ASC without the () around price.
is there a scenario where this could fail?
No
should i be using somesort of math function to do this?
No

3. thank you

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•