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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to select the record with the highest ID 1

Status
Not open for further replies.

farley99

MIS
Feb 12, 2003
413
US
Select highest_id FROM people where firstname LIKE chri*;

Where highest_id is the primary key auto-increment and the data contains
chris
chrissy
christain
chirstopher

What is the correct syntax for this? I want to find the one added most recent
 
Code:
Select * 
  FROM people 
 where firstname LIKE 'chri%'
   order by highest_id desc
   limit 1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top