This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JDBC and the fly likes SQL: howto retrieve only the first row? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "SQL: howto retrieve only the first row?" Watch "SQL: howto retrieve only the first row?" New topic
Author

SQL: howto retrieve only the first row?

Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
Hey all,

I have the following table and wonder how can I select all tickets that the FIRST Origin is JFK and code is 873?



In this example I expect only Ticket=1088 to return because ticket 1005 doesn�t start at JFK.

Thanks for any pointers
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2497
    
    8

very untested statement


OCUP UML fundamental and ITIL foundation
youtube channel
 
 
subject: SQL: howto retrieve only the first row?