More generally, in a real dbms (which you may or may not be talking about) there is no concept of first and last record from the client's perspective. You are deliberate told nothing (and can find out nothing) about the physical storage arrangments that the server may be using to keep the data on file.
If you've issued a query that includes an ORDER BY clause, that's a different matter: you can meaningfully talk of a "first" and "last" row relative to the results returned by a particular query.