Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select based on index

Status
Not open for further replies.

goatboy

Programmer
Aug 9, 2000
9
US
I am new to SQL and am trying to build a select statement that will return a key value based on the highest index number. This seem to be a simple task, but I can't find any specific information on it. Any assistance would be appreciated.
 

Is this waht you need?

Select KeyColumn From Table
Where ID = (Select Max(ID) From Table) Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top