what is subquery statement in sql

what is subquery statement in sql


prabakaran328
Views: 176 | Community Opinion: 1



Bookmark this page..



Ask a New Question Go to Home

Community Opinion/Answers
 
Gourav Said..

SQl is an Structured Query language. we use some kind of queries to get results from with or without conditions like

SELECT * FROM Tbl_Students WHERE Stu_Marks >70

so this is an simple type of Sql Query statement. sometime we need to use nested query statement known as sub-query statement LIKE

SELECT * FROM Tbl_Student WHERE Stu_Marks > (SELECT Stu_Marks FROM Tbl_Student WHERE Stu_Id = 126 )

so in this query i want to find out those students having marks more than marks of student id no 126.

so these type of queries are known as subquery statement.

Thanks






Register or Login to Post Your Opinion