mysql> desc qdb
-> ;
+-------------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+---------------+------+-----+---------+-------+
| employee_id | int(11) | YES | | NULL | |
| name | char(32) | YES | | NULL | |
| gender | enum('F','M') | YES | | NULL | |
| dept_id | int(11) | YES | | NULL | |
| join_time | date | YES | | NULL | |
| salary | float | YES | | NULL | |
| phone | char(16) | YES | | NULL | |
| address | text | YES | | NULL | |
| description | text | YES | | NULL | |
+-------------+---------------+------+-----+---------+-------+
9 rows in set (0.01 sec)
mysql> select * from qdb
-> ;
+-------------+-----------+--------+---------+------------+--------+------------+------------+-------------+
| employee_id | name | gender | dept_id | join_time | salary | phone | address | description |
+-------------+-----------+--------+---------+------------+--------+------------+------------+-------------+
| 1 | qidongbin | M | 1 | 2008-08-08 | 8000 | 1101081963 | beijingshi | ceo |
+-------------+-----------+--------+---------+------------+--------+------------+------------+-------------+
1 row in set (0.00 sec)
mysql> insert into qdb values (2,'xiaoruirui','F',1,'2009/9/9',4000,'1101081963','beijingshi',null);
Query OK, 1 row affected (0.00 sec)
mysql> select * from qdb
-> ;
+-------------+------------+--------+---------+------------+--------+------------+------------+-------------+
| employee_id | name | gender | dept_id | join_time | salary | phone | address | description |
+-------------+------------+--------+---------+------------+--------+------------+------------+-------------+
| 1 | qidongbin | M | 1 | 2008-08-08 | 8000 | 1101081963 | beijingshi | ceo |
| 2 | xiaoruirui | F | 1 | 2009-09-09 | 4000 | 1101081963 | beijingshi | NULL |
+-------------+------------+--------+---------+------------+--------+------------+------------+-------------+
2 rows in set (0.00 sec)
mysql> insert into qdb values (3,'xiaoyang','M',2,'2009/9/9',5000,'1101081963','beijingshi','chagn');
Query OK, 1 row affected (0.00 sec)
mysql> insert into qdb values (4,'nimei','F',2,'2010/4/6',3000,'1101081963','beijingshi','chagn');
Query OK, 1 row affected (0.00 sec)
mysql> insert into qdb values (5,'xiaoruirui','M',3,'2010/4/7',7000,'1101081963','beijingshi','chagn');
Query OK, 1 row affected (0.01 sec)
mysql> insert into qdb values (6,'xiaozouzou','F',3,'2010/7/7',5000,'1101081963','beijingshi','chagn');
Query OK, 1 row affected (0.01 sec)
mysql> insert into qdb values (7,'xiaozouzou','F',4,'2010/1/1',9000,'1101081963','beijingshi','chagn');
Query OK, 1 row affected (0.00 sec)
mysql> insert into qdb values (8,'xiaozouzou','M',4,'2010/1/1',8000,'1101081963','beijingshi','chagn');
Query OK, 1 row affected (0.01 sec)
mysql> select * from qdb
-> ;
+-------------+------------+--------+---------+------------+--------+------------+------------+-------------+
| employee_id | name | gender | dept_id | join_time | salary | phone | address | description |
+-------------+------------+--------+---------+------------+--------+------------+------------+-------------+
| 1 | qidongbin | M | 1 | 2008-08-08 | 8000 | 1101081963 | beijingshi | ceo |
| 2 | xiaoruirui | F | 1 | 2009-09-09 | 4000 | 1101081963 | beijingshi | NULL |
| 3 | xiaoyang | M | 2 | 2009-09-09 | 5000 | 1101081963 | beijingshi | chagn |
| 4 | nimei | F | 2 | 2010-04-06 | 3000 | 1101081963 | beijingshi | chagn |
| 5 | xiaoruirui | M | 3 | 2010-04-07 | 7000 | 1101081963 | beijingshi | chagn |
| 6 | xiaozouzou | F | 3 | 2010-07-07 | 5000 | 1101081963 | beijingshi | chagn |
| 7 | xiaozouzou | F | 4 | 2010-01-01 | 9000 | 1101081963 | beijingshi | chagn |
| 8 | xiaozouzou | M | 4 | 2010-01-01 | 8000 | 1101081963 | beijingshi | chagn |
+-------------+------------+--------+---------+------------+--------+------------+------------+-------------+
8 rows in set (0.01 sec)
mysql> select * from qdb where name='binzi';
Empty set (0.00 sec)
mysql> select * from qdb where name='qidongbin';
+-------------+-----------+--------+---------+------------+--------+------------+------------+-------------+
| employee_id | name | gender | dept_id | join_time | salary | phone | address | description |
+-------------+-----------+--------+---------+------------+--------+------------+------------+-------------+
| 1 | qidongbin | M | 1 | 2008-08-08 | 8000 | 1101081963 | beijingshi | ceo |
+-------------+-----------+--------+---------+------------+--------+------------+------------+-------------+
1 row in set (0.00 sec)
mysql> select * from qdb where salary>5000;
+-------------+------------+--------+---------+------------+--------+------------+------------+-------------+
| employee_id | name | gender | dept_id | join_time | salary | phone | address | description |
+-------------+------------+--------+---------+------------+--------+------------+------------+-------------+
| 1 | qidongbin | M | 1 | 2008-08-08 | 8000 | 1101081963 | beijingshi | ceo |
| 5 | xiaoruirui | M | 3 | 2010-04-07 | 7000 | 1101081963 | beijingshi | chagn |
| 7 | xiaozouzou | F | 4 | 2010-01-01 | 9000 | 1101081963 | beijingshi | chagn |
| 8 | xiaozouzou | M | 4 | 2010-01-01 | 8000 | 1101081963 | beijingshi | chagn |
+-------------+------------+--------+---------+------------+--------+------------+------------+-------------+
4 rows in set (0.00 sec)