/*--Google Analytics--*/ /*--Google Analytics--*/

Useful SQL Sub-SELECT(Sub Queries) Queries That Must Be Glanced

The Following Query is for the people who have some basic idea about databases, tables and SELECT statementsand these are some of the useful statements, mainly used in developing real time projects, so just remember their usage.


SELECT * FROM Orders WHERE OrderID IN
(SELECT DISTINCT OrderID FROM OrderItems WHERE ProductID = 3)



Sub Queries are very much useful in sutuations when it is not easy to express all the rows that need to be selected. In many real time situations these can be help ful, so understand them carefully.


Mainly These Are Useful in INSERTS, UPDATES and DELETES.



I am stoping here, bcoz all the sub queries syntaxes aresimilar but it is that how logically we think about the situation plays the key role.


Hope this article may be useful.


If u found any complex queries, post them as comments to share your knowledge with others.

1 comments:

Useful SQL SELECT Statements That Must Be Glanced « All My Doubts said...

[...] Lesson is about Sub Queries Or Sub-Select Statements Possibly related posts: (automatically generated)Creating Updateable ViewsLesson 01: [...]

Post a Comment