Kjell Arne Johansen
2005-05-14 08:57:08 UTC
Hi
In one of my tables in the MS SQL database all records are time stamped.
I want to know what is the oldest record.
I have used SELECT TOP 1 * FROM <table> WHERE Time > May 12 1990...
-and it works because I know the data in the table is newer than 1990 but is
there a more intelligent way of doing it?
(I also think it work because the primary key has an ascending sorting
order).
Thanks for Your help.
Regards
Kjell Arne Johansen
In one of my tables in the MS SQL database all records are time stamped.
I want to know what is the oldest record.
I have used SELECT TOP 1 * FROM <table> WHERE Time > May 12 1990...
-and it works because I know the data in the table is newer than 1990 but is
there a more intelligent way of doing it?
(I also think it work because the primary key has an ascending sorting
order).
Thanks for Your help.
Regards
Kjell Arne Johansen