IA/DB

[mysql] update

kiostory 2019. 2. 25. 23:05

 MySQL  kio.comwlqw18xbq.ap-northeast-2.rds.amazonaws.com:3306 ssl  kio  SQL >

select * from topic;
+----+------------+-------------------+---------------------+--------+---------+
| id | title      | description       | created             | author | profile |
+----+------------+-------------------+---------------------+--------+---------+
|  1 | MySQL      | MySQL is...       | 2018-01-01 12:10:11 | 1      | NULL    |
|  2 | Oracle     | Oracle is ...     | 2018-01-03 13:01:10 | 1      | NULL    |
|  3 | SQL Server | SQL Server is ... | 2018-01-20 11:01:10 | 2      | NULL    |
|  4 | PostgreSQL | PostgreSQL is ... | 2018-01-23 01:03:03 | 3      | NULL    |
|  5 | MongoDB    | MongoDB is ...    | 2018-01-30 12:31:03 | 1      | NULL    |
+----+------------+-------------------+---------------------+--------+---------+


 MySQL  kio.comwlqw18xbq.ap-northeast-2.rds.amazonaws.com:3306 ssl  kio  SQL >

 update topic set author='egoing' where id=1;

 update topic set author='kio' where id=2;

 update topic set author='kiostory' where id=3;

 update topic set author='freebee' where id=4;

 update topic set author='cookieg' where id=5;


 MySQL  kio.comwlqw18xbq.ap-northeast-2.rds.amazonaws.com:3306 ssl  kio  SQL >

select * from topic;
+----+------------+-------------------+---------------------+----------+---------+
| id | title      | description       | created             | author   | profile |
+----+------------+-------------------+---------------------+----------+---------+
|  1 | MySQL      | MySQL is...       | 2018-01-01 12:10:11 | egoing   | NULL    |
|  2 | Oracle     | Oracle is ...     | 2018-01-03 13:01:10 | kio      | NULL    |
|  3 | SQL Server | SQL Server is ... | 2018-01-20 11:01:10 | kiostory | NULL    |
|  4 | PostgreSQL | PostgreSQL is ... | 2018-01-23 01:03:03 | freebee  | NULL    |
|  5 | MongoDB    | MongoDB is ...    | 2018-01-30 12:31:03 | cookieg  | NULL    |
+----+------------+-------------------+---------------------+----------+---------+