For appending another field value (here id) in the end of password in MySQL

Anju

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

Abhik Chakraborty

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

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Mysql change id in field is another field = "transfer"

From Dev

MySQL overwrite value with value from another field

From Dev

Append MySQL field to the end of another field with some text as well

From Dev

Appending a % on the end of a calculated value in jQuery?

From Dev

how to show field value when i store its id from another table in mysql

From Dev

MySQL - How to select rows in a table where id value is in a comma delimited field in another table?

From Dev

Appending a CSV file to end of another, using Powershell

From Dev

mysql order by field name contained in another table field value

From Dev

Excel to SQL table field value appending with 0

From Dev

Elasticsearch update id of each document to a value of another field in the document

From Dev

Elasticsearch update id of each document to a value of another field in the document

From Dev

mysql update query to set field with id's of another table

From Dev

Scrapy appending Key: value pairs to another Key

From Dev

Scrapy appending Key: value pairs to another Key

From Dev

Python Searching for variable in file and appending another value

From Dev

MySQL join two table with the maximum value on another field

From Dev

MySQL: How to limit results to max value of another field?

From Dev

mySQL select based on sum of rows compared to another field value

From Dev

how to derived value of a filed from another field in MySql

From Dev

MySQL use "Auto Number Field Value" in another column on insert

From Dev

how to derived value of a filed from another field in MySql

From Dev

Password input field showing value

From Dev

Append Field value with another field

From Dev

Mongodb field value as another field

From Dev

Insert Text Field Name or ID as Value in MySQL Column

From Dev

Appending key : value data onto MySQL table

From Dev

Backbone model.save() not appending ID to end of URL

From Dev

how to group an ID field and select rows having highest value in another field PostgreSQL

From Dev

Add one table's id to another table for specific value mysql

Related Related

  1. 1

    Mysql change id in field is another field = "transfer"

  2. 2

    MySQL overwrite value with value from another field

  3. 3

    Append MySQL field to the end of another field with some text as well

  4. 4

    Appending a % on the end of a calculated value in jQuery?

  5. 5

    how to show field value when i store its id from another table in mysql

  6. 6

    MySQL - How to select rows in a table where id value is in a comma delimited field in another table?

  7. 7

    Appending a CSV file to end of another, using Powershell

  8. 8

    mysql order by field name contained in another table field value

  9. 9

    Excel to SQL table field value appending with 0

  10. 10

    Elasticsearch update id of each document to a value of another field in the document

  11. 11

    Elasticsearch update id of each document to a value of another field in the document

  12. 12

    mysql update query to set field with id's of another table

  13. 13

    Scrapy appending Key: value pairs to another Key

  14. 14

    Scrapy appending Key: value pairs to another Key

  15. 15

    Python Searching for variable in file and appending another value

  16. 16

    MySQL join two table with the maximum value on another field

  17. 17

    MySQL: How to limit results to max value of another field?

  18. 18

    mySQL select based on sum of rows compared to another field value

  19. 19

    how to derived value of a filed from another field in MySql

  20. 20

    MySQL use "Auto Number Field Value" in another column on insert

  21. 21

    how to derived value of a filed from another field in MySql

  22. 22

    Password input field showing value

  23. 23

    Append Field value with another field

  24. 24

    Mongodb field value as another field

  25. 25

    Insert Text Field Name or ID as Value in MySQL Column

  26. 26

    Appending key : value data onto MySQL table

  27. 27

    Backbone model.save() not appending ID to end of URL

  28. 28

    how to group an ID field and select rows having highest value in another field PostgreSQL

  29. 29

    Add one table's id to another table for specific value mysql

HotTag

Archive