Interviews3 answers
What are the properties of Sub–Query?
3 Answers
1. if we create a view using sub query then Insertion, Updation on that view can not be performed .
2. View should placed in parentheses
Pankaj Kumar ChoudharyPosted May 15, 2015, 9:47 AM EDT
A sub-query is a query embedded in another query. The sub query can be embedded in another SELECT, INSERT, UPDATE, or DELETE statement, or inside another sub query.
Properties:-
The SELECT query of a subquery is always enclosed in parentheses
View created by using a subquery cannot be updated.
The ntext, text, and image data types cannot be used in the select list of sub queries
If a table appears only in a subquery and not in the outer query, then columns from that table cannot be included in the output
Munesh SharmaPosted Oct 9, 2014, 1:29 AM EDT
A subquery must be enclosed in the parenthesis.
A subquery must be put in the right hand of the comparison operator
A subquery cannot contain a ORDER-BY clause.
A query can contain more than one sub-queries.
Ankur JainPosted Aug 18, 2014, 7:43 PM EDT



