mysql> select*from xodim where id= ANY
-> (select id mijoz);
+----+--------------+---------------+----------------+-----------+
| id | familyasi | ism | otasining_ismi | telefon |
+----+--------------+---------------+----------------+-----------+
| 1 | Bakirov| Bekmurod | Botirjon | 994672150 |
| 2 | Ergashaliyev | Elyor | Toxirjon | 932709421 |
| 3 | Bakirov |Bahrom| Dilshodjon | 911447793 |
+----+--------------+---------------+----------------+-----------+
4 rows in set (0.00 sec)
mysql> select*from xodim where id = ANY
-> (select id from mijoz);
+----+--------------+---------------+----------------+-----------+
| id | familyasi | ism | otasining_ismi | telefon |
+----+--------------+---------------+----------------+-----------+
| 1 | Bakiorv | Bekmurod | Botirjon | 994672150 |
| 2 | Ergashaliyev | Elyor | Toxirjon | 932709421 |
| 3 | Bakirov |Bahrom| Dilshodjon | 911447793 |
|
+----+--------------+---------------+----------------+-----------+
4 rows in set (0.00 sec)
mysql> select*from xodim where id != ALL
-> (select id from jarayon);
Empty set (0.00 sec)
mysql> select*from xodim where id != ALL
-> (select id from mijoz); Empty set
(0.00 sec)
Dostları ilə paylaş: