Oracle SQL: Get Last Record
You can use the following SQL statement in Oracle database to view the last record:
SELECT * FROM your_table_name
ORDER BY your_primary_key_column DESC
FETCH FIRST 1 ROW ONLY;
your_table_name is the name of the table to be queried, and your_primary_key_column is the name of the primary key column.
This SQL statement will retrieve the last record based on the primary key column in descending order. Using FETCH FIRST 1 ROW ONLY will restrict the result set to only return one row of data, which is the last record.