另一列的值如何包含主键的值?

时间:2014-08-28 08:00:37

标签: mysql

我想将主键的值包含在另一列

离)

enter image description here

但我不知道我该怎么做。

有效方法吗?

2 个答案:

答案 0 :(得分:2)

您可以使用CONCAT_WS

UPDATE
  myTable
SET
  another_column = 
    CONCAT_WS("_", another_column, id)

答案 1 :(得分:0)

试试这个

 Select id, concat(cloumnname,"_",id) from tablename
相关问题