MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Will Select give the result in order of primary key?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
ravikumar_sri2001
Beginner


Joined: 06 Dec 2002
Posts: 117
Topics: 44
Location: Chennai,India

PostPosted: Mon Mar 12, 2007 7:55 am    Post subject: Will Select give the result in order of primary key? Reply with quote

Hi Gurus,

I have a table called "my_table" with primary key defined on it.

If i do "SELECT * from my_table", will the result table in the order of primary key ?.

Thanks,
Ravikumar.
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Mon Mar 12, 2007 8:13 am    Post subject: Reply with quote

no, there is no default sequencing. If you want your returned rows in a particular sort order, you must have an ORDER BY clause.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
ravikumar_sri2001
Beginner


Joined: 06 Dec 2002
Posts: 117
Topics: 44
Location: Chennai,India

PostPosted: Mon Mar 12, 2007 11:02 pm    Post subject: Reply with quote

Thank you very much Dick Brenholtz.

-Ravikumar.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group