adsense

2011-03-15

[mysql] 3/14

mysql> select employeeid ,name,salary from employees where salary between 420000 and 520000;
+------------+--------+--------+
| employeeid | name   | salary |
+------------+--------+--------+
|       1008 | 蘇韻涵 | 420000 |
|       1012 | 賴俊良 | 450000 |
|       1014 | 王明亮 | 460000 |
|       1015 | 顏子福 | 450000 |
+------------+--------+--------+
4 rows in set (0.00 sec)

mysql> select employeeid ,name,salary from employees where employeeid in ('1002','1005');
+------------+--------+---------+
| employeeid | name   | salary  |
+------------+--------+---------+
|       1002 | 陳廣明 | 1400000 |
|       1005 | 劉天明 |  700000 |
+------------+--------+---------+
2 rows in set (0.01 sec)

mysql> select employeeid ,name,salary from employees where SupervisorID in ('1002','1005');
+------------+--------+--------+
| employeeid | name   | salary |
+------------+--------+--------+
|       1001 | 張瑾雯 | 540000 |
|       1003 | 趙飛燕 | 560000 |
|       1004 | 林美麗 | 560000 |
|       1005 | 劉天明 | 700000 |
|       1006 | 黎國明 | 560000 |
|       1007 | 郭國城 | 560000 |
|       1008 | 蘇韻涵 | 420000 |
|       1009 | 孟玉婷 | 560000 |
|       1010 | 張文德 | 680000 |
|       1013 | 何力宇 | 670000 |
+------------+--------+--------+
10 rows in set (0.00 sec)

mysql> select SupervisorID,employeeid ,name,salary from employees where SupervisorID in ('1002','1005');
+--------------+------------+--------+--------+
| SupervisorID | employeeid | name   | salary |
+--------------+------------+--------+--------+
|         1005 |       1001 | 張瑾雯 | 540000 |
|         1005 |       1003 | 趙飛燕 | 560000 |
|         1005 |       1004 | 林美麗 | 560000 |
|         1002 |       1005 | 劉天明 | 700000 |
|         1005 |       1006 | 黎國明 | 560000 |
|         1005 |       1007 | 郭國城 | 560000 |
|         1005 |       1008 | 蘇韻涵 | 420000 |
|         1005 |       1009 | 孟玉婷 | 560000 |
|         1002 |       1010 | 張文德 | 680000 |
|         1002 |       1013 | 何力宇 | 670000 |
+--------------+------------+--------+--------+
10 rows in set (0.00 sec)

mysql> notee

沒有留言:

張貼留言