469,958 Members | 1,914 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,958 developers. It's quick & easy.

Difference of GROUP BY + ORDER BY


Folks

When I perform a SELECT - whats the differences between GROUP BY and ORDER
BY?

Thanx
randell d.
Jul 19 '05 #1
1 7614
The Group by can be specified after the select * from tablename and we can also use the where clause or having clause for it, but in the case for order by we have to use the where clause and after which the Order by should come

example for Group By

select * from books group by book_name having book_rate > 10;


example for Order By
select * from books where book_rate > 10 order by book_name;

this is the difference between the Group By and Order By

Regards
:cool: Quadoss :cool:
May 4 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Johnson, Shaunn | last post: by
reply views Thread by rainxy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.