Hello,
I am newbie on mysql and trying to edit my database from terminal under linux.
What I need to do is to change the information written in a cell in table.
Let me explain what I tried:
$ mysql -u mysqluser -p
$ show databases;
$ USE catalogue;
$ show tables ;
$ select * from phonebook;
it shows something like this:
+-------------+------------+--------+
| id | friend_name | age |
+-------------+------------+--------+
| 1 | Jaxier | 18 |
| 2 | Johanna | 26 |
| 3 | Johny | 25 |
| 4 | Lacatus | 18 |
| 5 | Julia | 25 |
+-------------+------------+---------+
What I want to do is to set age of Lacatus from 18 to 58
I tried below commands:
1)
$ update phonebook set id 4 SET age 58;
gives syntax error.
2)
$ ALTER phonebook ALTER id ALTER 4 SET age 58;
I 'd appreciate if you could explain what I should run in terminal
Thanks in advance
Boris