Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
teamjai
Yak Posting Veteran
52 Posts |
Posted - 2013-01-24 : 02:31:39
|
By default, ORDER BY sorts the column in ascending order.i need to sort the column Without ORDER BY keyword in the SQL query, is it possible in SQL server 2008Eg:Select Seq.No from Student Order By Seq.Noit display Seq.No in Asc order. |
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2013-01-24 : 02:42:24
|
GROUP BY clause also sorts the results. Difference is duplicates will be removed from the listIf there is no duplicates for the column Seq.No , then GROUP BY will also give result in ascending order1) Select Seq.No from Student Order By Seq.No2) Select Seq.No from Student GROUP By Seq.No--Chandu |
|
|
teamjai
Yak Posting Veteran
52 Posts |
Posted - 2013-01-24 : 03:15:31
|
Thanks..But i need use only "Where".Using "where" keyword sorts the results. is it possible? |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2013-01-24 : 03:40:12
|
NO, there is no reliable order without using ORDER BY! Too old to Rock'n'Roll too young to die. |
|
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2013-01-24 : 03:45:31
|
quote: Originally posted by teamjai Thanks..But i need use only "Where".Using "where" keyword sorts the results. is it possible?
I guess that is not possible....--Chandu |
|
|
|
|
|