In my MySQL query I have:
SELECT price FROM stock;
How can I get add the $ sign in front of the price?
Answer:
Use the function called CONCAT() to concatenate strings.
e.g.: SELECT CONCAT('$', CAST(price AS char)) AS price FROM stock;
:: Adding $ sign to MySQL output ::
Question:
In my MySQL query I have: Answer: Use the function called CONCAT() to concatenate strings.
|