Interview Questions   Tutorials   Discussions   Programs   

DB2 - What is sub query ?




307
views
asked mar August 3, 2014 07:23 AM  

What is sub query ?


           

1 Answers



 
answered By Mswami   0  
A subquery is a query that is written as part of another query’s WHERE clause.


Example:

 SELECT col_name1,col_name2
   FROM table_A
    WHERE col_name3 < (SELECT Avg(col_name)
   	FROM table_A WHERE 
     col_name4 = ‘constant’)


flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert