I have a table containing 1 column id. Now I want to create a new column for my table. Therefore, I want the data of the new column to be hashed id. something like that:
// my table
+------+
| id |
+------+
| 1 |
| 2 |
| 3 |
+------+
// I want this table
+------+------------+
| id | hashed |
+------+------------+
| 1 | 00320032 |
| 2 | 00330033 |
| 3 | 00340034 |
+------+------------+
It should be noted that the column is hashedbased:
hash('adler32', '1'); // output: 00320032
hash('adler32', '2'); // output: 00330033
hash('adler32', '3'); // output: 00340034
Now, is it possible to do this?
source
share