Unix C++
Would you like to react to this message? Create an account in a few clicks or log in to continue.

need explanation !!!!

3 posters

Go down

need explanation !!!! Empty need explanation !!!!

Post by Abhiramy 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

Back to top Go down

need explanation !!!! Empty Re: need explanation !!!!

Post by Christopher 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
Christopher
Christopher
Admin

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

https://unixcpp.forumotion.com

Back to top Go down

need explanation !!!! Empty Re: need explanation !!!!

Post by Vineet_More 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

Back to top Go down

need explanation !!!! Empty Re: need explanation !!!!

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


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