用于在MySQL的密码末尾附加另一个字段值(此处为id)

For appending another field value (here id) in the end of password in MySQL,In my table usermaster,

+----+-------------+  
| id | password    |  
+----+-------------+  
|  1 | anju        |  
|  2 | lija        |  
|  3 | bhumi       |  
|  4 | henry       |  
+----+-------------+ 

i need my updated table like this below

+----+-------------+  
| id | password    |  
+----+-------------+  
|  1 | anju@1      |  
|  2 | lija@2      |  
|  3 | bhumi@3     |  
|  4 | henry@4     |  
+----+-------------+ 

By appending password field with "id" in end along with "@". My query is like this:

UPDATE `user_master` SET `password` = concat(password,id)  WHERE 1

But it appends only id, how can i do "@" also. Please some one help me

You can do as

UPDATE `user_master` SET `password`=concat(password,'@',id)

Check the document here http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_concat

You can also use CONCAT_WS function:

UPDATE `user_master`
SET `password` = CONCAT_WS('@', password, id)