473,321 Members | 1,877 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

unsorted column

shoonya
161 100+
I am having a table where a column contains (integer) contains some numbers in a certain fashion.
now if i only select that column then all the numbers are displayed in sorted way
is there any option to avoid this apart from using a serial key in the table

shoonya
May 30 '07 #1
3 1919
michaelb
534 Expert 512MB
I am having a table where a column contains (integer) contains some numbers in a certain fashion.
now if i only select that column then all the numbers are displayed in sorted way
is there any option to avoid this apart from using a serial key in the table

shoonya
Unless you provide the ORDER BY clause the order of result set is not determined, typically you get your records sorted in the way they were inserted (or updated)

If you want to change the default order use the ORDER BY clause where you can specify the desired order, for example
Expand|Select|Wrap|Line Numbers
  1. select column-name from tab-name order by column-name ASC;
  2. select column-name from tab-name order by column-name DESC;
  3. select column-name from tab-name order by random();
  4. select column-one from tab-name order by column-two;
  5.  
Jun 5 '07 #2
shoonya
161 100+
what does this last option do??
Jun 5 '07 #3
michaelb
534 Expert 512MB
what does this last option do??
Expand|Select|Wrap|Line Numbers
  1. SELECT first_name  FROM students ORDER BY last_name;
  2.  
Ordering the result set by a column not included in the select list
Jun 5 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: nimdez | last post by:
Hi, I am working on an existing code base in which a lot of data displayed to the user is formatted in tables. Most tables are printed row-by-row using printf() with "%s" print conversion...
0
by: Thomas Wegener | last post by:
Is there any way to put the properties in a unsorted order? Thanks Thomas
19
by: Owen T. Soroke | last post by:
Using VB.NET I have a ListView with several columns. Two columns contain integer values, while the remaining contain string values. I am confused as to how I would provide functionality to...
3
by: David Scemama | last post by:
Hi, I need to store (key,Value) pairs, but I don't want them sorted. I need to access to the keys or values by index. I also need to access the indexes using keys or values. The only class...
3
by: Peter J Ross | last post by:
Greetings. I'm quite new to PHP and have very little knowledge of programming in general, so I may be missing something obvious, but I can't find a solution to the following difficulty in either...
3
by: gemacjr1201 | last post by:
I need to open a file that has unsorted list of names and birthdates formated like this: LASTNAME, FIRST$MM/DD/YYYY\n.It could have as much as 100 names. I will use a selection sort algorithm to...
3
by: jesusdiehard | last post by:
hi friends guys i have a question that suppose there is very big array of unsorted number and we have to find nth biggest number in opitmized manner, then how we can do it. n parameter can be...
2
by: clogg02 | last post by:
Hi, I have bound a DataView to a DataGridView using this.dataGridView1.DataSource = new DataView(this.dataTable1); I allow for sorting of the datagridview using clicks on the headers. Later...
0
by: hg | last post by:
I'm in search of a STL datastructure which will let me implement an unsorted map. I have data in the form of a key and corresponding value which needs to be used as a FIFO queue. In most cases...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.