官术网_书友最值得收藏!

  • MySQL 8 for Big Data
  • Shabbir Challawala Jaydip Lakhatariya Chintan Mehta Kandarp Patel
  • 73字
  • 2021-08-20 10:06:14

Subquery

A Select statement under the select statement is called a subquery. This sub statement can be used to select the column or in conditional cases. A subquery can also be nested within another query statement like INSERT, UPDATE, or DELETE.

The following query returns a set of users who are located in Ahmedabad using a subquery:

SELECT firstName, lastName FROM users 
WHERE city IN
(SELECT city FROM cities WHERE city = 'Ahmedabad');
主站蜘蛛池模板: 饶河县| 正定县| 潮安县| 广安市| 齐齐哈尔市| 孝义市| 崇仁县| 兰州市| 肇州县| 舒兰市| 河北省| 万安县| 绿春县| 保定市| 崇仁县| 阳信县| 揭阳市| 寻乌县| 荣成市| 永平县| 同仁县| 张北县| 温泉县| 蛟河市| 平顺县| 襄樊市| 莱芜市| 锡林浩特市| 桦川县| 公主岭市| 林西县| 迭部县| 中卫市| 合川市| 界首市| 乐亭县| 荥经县| 临清市| 太谷县| 甘洛县| 东乌|