Home » SQL & PL/SQL » SQL & PL/SQL » Group by Clause
Group by Clause [message #213069] Tue, 09 January 2007 05:46 Go to next message
Praseeja
Messages: 12
Registered: February 2006
Junior Member
Hi,

I have an employee table with the following values:
SQL> select * from employee;
ENO ENAME MNO
---------- ------------------------------ ----------
231 jjjj 12
123 dfdj 12
213 hjj 12
713 ttr 10
719 gfr 10
715 gwe 10
6 rows selected.

I want the output to display as:
MNO ENO ENAME
---------- ---------- ------------------------------
10 713 ttr
715 gwe
719 gfr
12 123 dfdj
213 hjj
231 jjjj

Could anyone please help me to achieve the above output.
Re: Group by Clause [message #213071 is a reply to message #213069] Tue, 09 January 2007 05:53 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
SQL> break on mno
SQL> select mno, eno, ename
	from employee
	order by 1,2;

You may want to use CODE tags around your code when you post.
Re: Group by Clause [message #213072 is a reply to message #213071] Tue, 09 January 2007 05:57 Go to previous message
Praseeja
Messages: 12
Registered: February 2006
Junior Member
Thanks a lot.
Its working Fine.
Previous Topic: query
Next Topic: Required query analysis..
Goto Forum:
  


Current Time: Sat Dec 10 01:28:05 CST 2016

Total time taken to generate the page: 0.22726 seconds