MySQL Forums
Forum List  »  MySQL Workbench

Changing Data Type when doing SELECT funtion
Posted by: Miguel Jimenez
Date: November 23, 2018 09:19PM

I'm doing a SELECT function, but one of the column is displayed as integer. I want to display this column ad decimal with two digits. The column is a count. What is the correct sintax to do this.

SELECT attribute1, attribute2, count(attribute)
FROM table1
ORDER BY count(attribute);

Options: ReplyQuote


Subject
Views
Written By
Posted
Changing Data Type when doing SELECT funtion
34
November 23, 2018 09:19PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.