一样可以的,见下例:
mysql> create table aa (id varchar(20) not null,name varchar(30));
Query OK, 0 rows affected (0.13 sec)mysql> insert into aa values('1','aa'),('2','bb'),('3','cc'),('7','dd');
Query OK, 4 rows affected (0.01 sec)
Records: 4  Duplicates: 0  Warnings: 0mysql> select * from aa;
+----+------+
| id | name |
+----+------+
| 1  | aa   |
| 2  | bb   |
| 3  | cc   |
| 7  | dd   |
+----+------+
4 rows in set (0.00 sec)mysql> update aa set id=id+1;
Query OK, 4 rows affected (0.00 sec)
Rows matched: 4  Changed: 4  Warnings: 0mysql> select * from aa;
+----+------+
| id | name |
+----+------+
| 2  | aa   |
| 3  | bb   |
| 4  | cc   |
| 8  | dd   |
+----+------+
4 rows in set (0.00 sec)

解决方案 »

  1.   

    hy2003fly(),你好,但这样不行吧:update aa set name=name+'ee, ' where id='3';
      

  2.   

    这样的确不行,在这里字符串的操作只能是替换和连接,见如下:
    mysql> select * from aa;
    +----+------+
    | id | name |
    +----+------+
    | 2  | aa   |
    | 3  | ee   |
    | 4  | cc   |
    | 8  | dd   |
    +----+------+
    4 rows in set (0.00 sec)mysql> update aa set name=concat(name,'ee') where id='3';
    Query OK, 1 row affected (0.00 sec)
    Rows matched: 1  Changed: 1  Warnings: 0mysql> select * from aa;
    +----+------+
    | id | name |
    +----+------+
    | 2  | aa   |
    | 3  | eeee |
    | 4  | cc   |
    | 8  | dd   |
    +----+------+
    4 rows in set (0.00 sec)
    这两种不知道有没有是你想要的,没有的话,就真的很抱赚帮不了你。
      

  3.   

    谢谢hy2003fly()!!我想我需要第二种