I want the record in table is sorted, I try to use index but not succesful,
why?
I am using SQLServer 2000YOu could create a clustered index which defines the rows / data to be
physically sorted after the clustered key. but if you want to get the
data in an ordered way, the best thing is to use the ORDER BY clause.
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--|||Use ORDER BY clause
"kei" <kei@.discussions.microsoft.com> wrote in message
news:0DB8A9B7-CFD0-4671-B585-9B8E948E4C9E@.microsoft.com...
>I want the record in table is sorted, I try to use index but not succesful,
> why?
> I am using SQLServer 2000|||kei
No, don't relay on phisycal order .If you wanted to get out a sorted result
use ORDER BY clause for your safety
"kei" <kei@.discussions.microsoft.com> wrote in message
news:47E2427C-C55B-4970-808F-8AF193920F36@.microsoft.com...
> No, I means the physical order, not using sql statement, anyway, I think
> the
> answer is clustered index, thx!!
> "Uri Dimant" wrote:
>> Use ORDER BY clause
>>
>>
>> "kei" <kei@.discussions.microsoft.com> wrote in message
>> news:0DB8A9B7-CFD0-4671-B585-9B8E948E4C9E@.microsoft.com...
>> >I want the record in table is sorted, I try to use index but not
>> >succesful,
>> > why?
>> > I am using SQLServer 2000
>>|||No, I means the physical order, not using sql statement, anyway, I think the
answer is clustered index, thx!!
"Uri Dimant" wrote:
> Use ORDER BY clause
>
>
> "kei" <kei@.discussions.microsoft.com> wrote in message
> news:0DB8A9B7-CFD0-4671-B585-9B8E948E4C9E@.microsoft.com...
> >I want the record in table is sorted, I try to use index but not succesful,
> > why?
> > I am using SQLServer 2000
>
>|||No that wouldn't actually solve it as Uri already explained.
The why is due to the definition of a table in relational
database systems. A table has unordered rows and columns.
The physical order of the columns and rows does not, should
not matter. You manage ordering through SQL statements and
order by clauses.
-Sue
On Wed, 26 Apr 2006 02:40:01 -0700, kei
<kei@.discussions.microsoft.com> wrote:
>No, I means the physical order, not using sql statement, anyway, I think the
>answer is clustered index, thx!!
>"Uri Dimant" wrote:
>> Use ORDER BY clause
>>
>>
>> "kei" <kei@.discussions.microsoft.com> wrote in message
>> news:0DB8A9B7-CFD0-4671-B585-9B8E948E4C9E@.microsoft.com...
>> >I want the record in table is sorted, I try to use index but not succesful,
>> > why?
>> > I am using SQLServer 2000
>>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment