I had that question in a code interview, I found a possible solution but I want to hear from you so thanks for your comments and help.
Select max(ID) from table where ID not in (select max(ID) from table)
I had that question in a code interview, I found a possible solution but I want to hear from you so thanks for your comments and help.
Select max(ID) from table where ID not in (select max(ID) from table)