Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Thanks for creating this site - I expect to be visiting it often as I continue to try to grow my bag of tricks!..."

Geography

Where in the world do Tek-Tips members come from?
dhulbert (TechnicalUser)
18 May 12 6:33

If I have a number of records returned from a query, and the resut set has an order by clause, what happens when 2 or more rows meet the same criteria

for example

ColA Colb ColC
A 1 Z
B 1 Y
C 2 X
C 2 W


If I Order By ColA, ColB then which way round would the 2 C rows be returned?

I have a feeling they will be returned in the order they are read from the source table but I just want to confirm it.

Cheers.

I love deadlines. I like the whooshing sound they make as they fly by
Douglas Adams
(1952-2001)

pjw001 (TechnicalUser)
18 May 12 7:10
The sequence is undefined. It will probably/usually be in the sequence the rows were created, or based on an index, but if the sequence matters you need to ensure that your order by clause includes all appropriate fields.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close