Home » SQL & PL/SQL » SQL & PL/SQL » how to get the first row of record ?
how to get the first row of record ? [message #404712] Sat, 23 May 2009 00:30 Go to next message
greentea
Messages: 12
Registered: May 2009
Junior Member
I have the following data
Table name: Customer
Customer Location Contact_Person
-------- -------- ---------------
A001 Misisipi Henry
A001 Boston Emily
A002 Angel
A002 L.A. John
A002 New York Hari

In this table, 3 of the field are primary key.
How do I select the first row of the data that group by customer and location?
Expected data:
Customer Location Contact_Person
-------- -------- ---------------
A001 Misisipi Henry
A002 A002 Angel




Re: how to get the first row of record ? [message #404718 is a reply to message #404712] Sat, 23 May 2009 00:57 Go to previous message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
Unless or until you have a column to order by (like creation_date, etc), you can't get that.

By
Vamsi
Previous Topic: Optimistic locking
Next Topic: Convert into partition table
Goto Forum:
  


Current Time: Thu Dec 12 05:03:13 CST 2024