Skip to content
Advertisement

Adding prefix to value in SQL row values

I have about 10000 rows in SQL table, and I need to add a prefix before each value of user column.

Example: I have value names like John, Smith, and so on, and I need to set QA-John, QA-Smith, and so on.

Is there an SQL function that can do it automatically or only can be done it one by one?

Advertisement

Answer

I got it.

UPDATE my table SET column_name = CONCAT('prefix', column_name)
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement