Posted by Sullivan Dane on 04/13/06 03:09
Hi .... when u do a SELECT statement, by default, the result set is
ordered by the index key/ keys defined in the table.... in example:
imagine a orders table having an UniqueID field as the primary key and
a DateofOrder field(timestamp) defined as a index of that table... any
SELECT statement (regardless of the WHERE clause) would by ordered
firstly by UniqueID field then by the DateofOrder field.... unless of
course that u use the ORDER BY clause ..
anyway IMHO if u are trying to extract an specific subset of data to
show to the the enduser a good way is to use a combination of the
BETWEEN and the LIMIT clause 'cause it extracts a specific subset of
data while limiting the records u want to return to the user...
i hope it helps in some way
Sullivan
"The major difference between a thing that might go wrong and a thing
that cannot possibly go wrong is that when a thing that cannot possibly
go wrong goes wrong it usually turns out to be impossible to get at or
repair."
Douglas Adams (1952 - 2001)
Navigation:
[Reply to this message]
|