i need a querry to add -- in the end of a table. for example if i have a table like

tb name ze

   ad|ID|   aa  |
    01|02|aa01   |
    02|03|aa02   |

how do i add -- to the end of all fields of aa column to be like aa01--\aa02--?

Recommended Answers

SELECT CONCAT(aa, '--') AS aa FROM yourtable
Jump to Post

All 5 Replies


thanks, i'll try it, if i cannot do it wright, i'll ask for help again

or i did not understand the concat function or it just dont do what i need

as far as i understod, concat function output the table contens plus the separator,
what i need is to add in the table content the "--" in the end of all the column.

SELECT CONCAT(aa, '--') AS aa FROM yourtable

thanks, i've found a way earlier, just fotgot to post it... after driking another coffe i finaly understand it.


Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.