Jump to content


This topic is now archived and is closed to further replies.


modify data on select

Recommended Posts

I have a table contain a field named 'price' and it is a numeric data.
That field, as you know, hold a numeric number represent an amount of money.

when I do: "select price from table where 1"
it will return the price in numeric form:



The question is, how can I set the query so that it will return


how can I have mysql to insert a dollar sign before the data upon return the result?

Thank you very much in advance.

Share this post

Link to post
Share on other sites
actually, i just found the solution from the manual:

select concat('$',price) as price


Share this post

Link to post
Share on other sites
This topic is now closed to further replies.


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.