Storing sorted data in VB Oracle

Not open for further replies.


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!


God of Mistakes...
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.


Always confused
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.
Not open for further replies.
Top Bottom