Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

does "order by" change the data in the table?

 
sahar sa
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear,
I have a table and I want to retrive some data from this table. I want them to be sorted so I have this snippet code:

now I want to know after that I retrived this information from table.
the data in the table is also sorted?
Thankyou, beforehand,
Sahar.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SELECT statements do not alter data in the database. What's more, relational databases have no notion of records in a table being sorted. It's only when some (or all) of them get SELECTed that an ordering is applied to the result.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic