INSERT INTO pet VALUES('Fluffy','Harold','cat','f','1993-02-04',NULL);
Query OK, 1 row affected (0.10 sec)
mysql> INSERT INTO pet VALUES('Claws','Gwen','dog','m','1994-03-17',NULL);
Query OK, 1 row affected (0.13 sec)
mysql> INSERT INTO pet VALUES('Buffy','Harold','dog','m','1989-05-13',NULL);
Query OK, 1 row affected (0.01 sec)
mysql> INSERT INTO pet VALUES('Fang','Benny','dog','m','1990-08-27',NULL);
Query OK, 1 row affected (0.13 sec)
mysql> INSERT INTO pet VALUES('Bowser','Diane','dog','m','1979-08-31','1995-07-29');
Query OK, 1 row affected (0.01 sec)
mysql> INSERT INTO pet VALUES('Chirpy','Gwen','bird','f','1998-09-11',NULL);
Query OK, 1 row affected (0.00 sec)
mysql> INSERT INTO pet VALUES('Whistler','Gwen','bird',NULL,'1997-12-09',NULL);
Query OK, 1 row affected (0.00 sec)
mysql> INSERT INTO pet VALUES('Slim','Benny','snake','m','1996-04-29',NULL);
Query OK, 1 row affected (0.01 sec)
VALUES('Puffball','Diane','hamster','f','1990-03-30',NULL);
Query OK, 1 row affected (0.01 sec)
mysql> select * from pet;
+----------+--------+---------+------+------------+------------+
| name | owner | species | sex | birth | death |
+----------+--------+---------+------+------------+------------+
| Puffball | Diane | hamster | f | 1999-03-30 | NULL |
| 旺财 | 周星驰 | 狗 | 公 | 1990-01-01 | NULL |
| Fluffy | Harold | cat | f | 1993-02-04 | NULL |
| Claws | Gwen | dog | m | 1994-03-17 | NULL |
| Buffy | Harold | dog | m | 1989-05-13 | NULL |
| Fang | Benny | dog | m | 1990-08-27 | NULL |
| Bowser | Diane | dog | m | 1979-08-31 | 1995-07-29 |
| Chirpy | Gwen | bird | f | 1998-09-11 | NULL |
| Whistler | Gwen | bird | NULL | 1997-12-09 | NULL |
| Slim | Benny | snake | m | 1996-04-29 | NULL |
| Puffball | Diane | hamster | f | 1990-03-30 | NULL |
+----------+--------+---------+------+------------+------------+
11 rows in set (0.00 sec)
删除数据
mysql> delete from pet where name='Fluffy';
Query OK, 1 row affected (0.15 sec)
修改数据
mysql> update pet set name='旺旺财' where owner='周星驰';
Query OK, 1 row affected (0.04 sec)
Rows matched: 1 Changed: 1 Warnings: 0