select docName,max(appID) as appID from Appointment where patID='p00000001' group by docName;
select * from Appointment where appID = ( select max(appID) from Appointment where patID='p00000001')
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)