need explanation !!!!

Go down

need explanation !!!!

Post by Abhiramy on Mon Mar 22, 2010 4:01 pm

can someone tell the difference between having and where clause in dbms???

Abhiramy

Posts : 9
Points : 21
Join date : 2010-02-26

View user profile

Back to top Go down

Re: need explanation !!!!

Post by Christopher on Mon Mar 22, 2010 4:16 pm

WHERE clause is used to specify condition for individual rows.
Code:
SELECT ROLLNO,NAME,AGE FROM STUDENT WHERE AGE > 20

HAVING clause is used to specify condition for groups.
Code:
SELECT AGE, AVG(MARKS) FROM STUDENT GROUP BY AGE HAVING AVG(MARKS)>50
avatar
Christopher
Admin

Posts : 240
Points : 429
Join date : 2010-02-26
Age : 30

View user profile http://unixcpp.forumotion.com

Back to top Go down

Re: need explanation !!!!

Post by Vineet_More on Mon Mar 22, 2010 4:19 pm

Having clause can be used to restrict groups whereas where clause cannot be used to restrict...

Vineet_More

Posts : 27
Points : 31
Join date : 2010-02-26

View user profile

Back to top Go down

Re: need explanation !!!!

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum