DIGIT-ARC read-only archive · snapshot: July 23, 2026

Storing sorted data in VB Oracle

4 posts · originally from https://geek.digit.in/community/threads/storing-sorted-data-in-vb-oracle.127293/

P
prabhatmohit Original post #1
May 25, 2010 at 7:25 PM
Hey friends,

I am developing an applicationn using VB 6 and Oracle.
Can any1 tell me how to make sure that when I store data in Oracle db through VB, It is stored automatically in sorted form by a field empcode?

Thanks a lot!
Garbage
Garbage #2
May 25, 2010 at 7:33 PM
AFAIK, there is no guaranty that data will always stored sorted based on emp_id, you can retrieve it using "ORDER BY" clause to get it in order.
vamsi360
May 27, 2010 at 1:18 PM
or you can write an SQL query to export the sorted results to another table.

Or you can write a check statement while inserting.

CHECK (new_id>MAX(select id from table_name))
//then insert here.

Second method is what you have asked for.