Jump to content

Archived

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

hvle

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:

234.30
200.00

etc.

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

$234.30
$200.00

instead.
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

Thanks

Share this post


Link to post
Share on other sites
Guest
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.