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

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');
主站蜘蛛池模板: 彭泽县| 杭锦后旗| 乌海市| 乃东县| 肥乡县| 隆德县| 甘孜县| 抚松县| 凉城县| 清河县| 渝中区| 安义县| 墨脱县| 博白县| 盘山县| 宁德市| 台东县| 永福县| 手机| 襄城县| 余庆县| 托克托县| 固阳县| 睢宁县| 枣强县| 衢州市| 陆河县| 华容县| 靖边县| 乌什县| 怀远县| 遂溪县| 吴川市| 湾仔区| 汶上县| 平远县| 晴隆县| 山阳县| 东乡| 沙田区| 河源市|