Home > database >  Oracle cursor cursor
Oracle cursor cursor

Time:10-10

Oracle cursor query of data is of the order by, but again to insert when inserted into a table of data sequence is not the same as cursor query out of order, what's the use of it in my cursor order by, how to solve??? O great god teach

CodePudding user response:

Cursor order no problem, insert the query sequence can't disproving the cursor after order, not letter try dbms_output. Put_line print cursor query results,

CodePudding user response:

The
refer to the original poster weixin_44024550 response:
Oracle cursor query of data is of the order by, but again to insert when inserted into a table of data sequence is not the same as cursor query out of order, what's the use of it in my cursor order by, how to solve??? O great god teach


Cursor in order by, can ensure that you insert the target table when the order of the data, but does not guarantee you query the order when the target table, the query can add an order by clause.

CodePudding user response:

Is another idea is to create a logo auxiliary columns, can according to the sequence to deal with, when insert is inserted into the target table, auxiliary columns may, in accordance with the goal of knowledge, can be consistent with the order by order of the cursor,

CodePudding user response:

reference Rotel reply: 3/f
is another idea is to create a logo auxiliary columns, can according to the sequence to deal with, when insert is inserted into the target table, auxiliary columns may, in accordance with the goal of knowledge, can be consistent with the order by order of the cursor,


In this case, the query target table data, or in accordance with the auxiliary column sorting,

CodePudding user response:

What your cursor according to the order by, at the time of the query in the corresponding field to add the order by
Or you can try the iot table, iot is written order

CodePudding user response:

references to learning - turn 5 floor response:
cursor in what order by you, at the time of the query in the corresponding field to add the order by
Or you can try the iot table, iot is written order


Index organized tables (IOT) should also can't guarantee the order strictly, the key to see what is the specific access operation,
  • Related