Mega Code Archive
Search
.Net
ASP .Net
ASP .Net Tutorial
C#
C# Book
C# by API
C# Tutorial
VB.Net
VB.Net by API
VB.Net Tutorial
Visual C++ .Net
VisualBasic Script
Java
Java
Java Book
Java by API
Java Tutorial
Script
Flash ActionScript
Flex
JavaScript DHTML
JavaScript Reference
JavaScript Tutorial
Database
MSSQL
MSSQL Tutorial
MySQL
MySQL Tutorial
Oracle PLSQL
Oracle PLSQL Tutorial
PostgreSQL
Languages
Android
C
C Tutorial
C++
C++ Tutorial
Delphi
Perl
PHP
Python
Python Tutorial
Ruby
Silverlight
Office
MSOfficeExcel 2007 Tutorial
MSOfficePowerPoint 2007 Tutorial
MSOfficeWord 2007 Tutorial
Data
XML
XML Tutorial
MSSQL
Subquery 29 codes
Home
MSSQL
Subquery
1 A subquery can be used with comparison operators
2 A subquery is simply a SELECT query within a SELECT query
3 ANY evaluates to true if the result of an inner query contains at least one row that satisfies the comparison
4 Correlated subquery
5 Correlated subquery using Distinct
6 Correlated subquery using the department table in both inner and outer queries
7 EXISTS evaluates to true if its result contains at least one row
8 EXISTS Function and Subqueries
9 Leaf-Level Employees (Employees with No Subordinates), Correlated Subquery Syntax
10 Leaf-Level Employees (Employees with No Subordinates), Join Syntax
11 Nested three level subquery with IN operator
12 NOT EXISTS()
13 Return a single value from subquery
14 Reversing the logic using the NOT IN operator
15 RTRIM
16 RTRIM(city),30)
17 Subqueries and ALL operator
18 Subqueries and ANY operator
19 Subqueries and Comparison Operators
20 Subqueries and IN Operator
21 Subqueries can be nested
22 Use aggregate function in subquery
23 Use aggregate function MAX in subquery
24 Use IN operator for a single value
25 Using a Nested Subquery
26 Using the EXISTS() Function
27 Using the IN() Function for subquery
28 WHERE clause in the subquerys SELECT statement links the inner query to the outer query
29 Write a query as part of the FROM clause