Is it possible to navigate rowtype rows in Oracle?

Let's say I have something like this:

somerecord SOMETABLE%ROWTYPE;

Is it possible to access somerecord fields without knowing the field names? Something like somerecord [i] so that the order of the fields is the same as the order of the columns in the table?

I saw some examples using dynamic sql, but I was wondering if there is a cleaner way to do this.

What I'm trying to do is generate / get DML (insert query) for a specific row in my table, but I could not find anything on this.

If there is another way to do this, I would be happy to use it, but it would also be very curious to find out how to make the previous part of this question - this is more universal.

thank

+3
source share
2 answers

, , ...

USER_TAB_COLUMNS ( * _TAB_COLUMN ) , (COLUMN_NAME), (COLUMN_ID) (DATA_TYPE) ( ), DML.

SQL DML (, , SQL ).

( ). , DBMS_SQL ( ).

, .

+2

, .

, , , sql , update someTable set row = someTableRecord where someTable.id = someTableRecord.id;.

, , , , , , , , .

+1

All Articles