I wanted to know how to pull the last information that was registered in the bank, but I can not use the ID.
In my Route table you have the columns Id (PK), Date, Current_Malue, Combustivel and NVeiculoId (CK).
In this table I need to get the last Km_Atual typed and compare with what was already registered in that vehicle that would be the NVeiculoId.
I use a SQL SERVER.