Selecting First and Last record from a table in SQL Server
I am using following quarries to find first as well as last inserted
records from a table
select top (1) titlenumber from cataloguebase
SELECT TOP(1) titlenumber FROM cataloguebase
ORDER BY titlenumber DESC;
but how can i get first and last record using single query..? at list is
possible using HQL query...?
No comments:
Post a Comment