mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
| testDB |
+--------------------+
5 rows in set (0.01 sec)
mysql> use testDB;
Database changed
mysql> create table user_log
-> (
-> nickname varchar(64),
-> money dec(10, 2),
-> last_visit datetime
-> )
-> ;
Query OK, 0 rows affected (0.02 sec)
;
를 입력하면 입력이 끝남참조
mysql> insert into user_log values('kyu', 1000, '2021-01-30');
Query OK, 1 row affected (0.02 sec)
mysql> insert into user_log values('yui', 2000, '2021-01-29');
Query OK, 1 row affected (0.00 sec)
mysql> commit;
Query OK, 0 rows affected (0.00 sec)
mysql> select * from user_log;
+----------+---------+---------------------+
| nickname | money | last_visit |
+----------+---------+---------------------+
| kyu | 1000.00 | 2021-01-30 00:00:00 |
| yui | 2000.00 | 2021-01-29 00:00:00 |
+----------+---------+---------------------+
2 rows in set (0.00 sec)