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

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');
主站蜘蛛池模板: 敦化市| 巴南区| 衡阳县| 宁德市| 婺源县| 麟游县| 洪江市| 白城市| 武乡县| 广安市| 博湖县| 德格县| 赣榆县| 南川市| 平江县| 华宁县| 共和县| 渝中区| 洛隆县| 万荣县| 寿阳县| 晋中市| 朝阳区| 新巴尔虎左旗| 理塘县| 芜湖市| 江都市| 林西县| 上栗县| 瑞安市| 丽水市| 闵行区| 桂林市| 威海市| 育儿| 砚山县| 赣榆县| 石首市| 邢台市| 金昌市| 鄂尔多斯市|