How can I add text to SQL Column

前端 未结 5 1093
盖世英雄少女心
盖世英雄少女心 2021-02-14 17:15

I want to update 1 column in SQL Table. Example: Current value in column is like this

2013/09/pizzalover.jpg 
2013/10/pasta.jpg       

Now i wa

5条回答
  •  旧巷少年郎
    2021-02-14 17:27

    OP doesn't specify which DBMS they are using. The following is for Postgres to update a text column by adding a prefix to it (tested with PostgreSQL v11):

    UPDATE my_table 
    SET column_1  = 'start_text_' || column_1
    WHERE column_1 LIKE 'prefix_%'
    ; 
    

提交回复
热议问题