开发者

Updating User-defined types in Oracle 11G

开发者 https://www.devze.com 2023-02-04 16:42 出处:网络
Is there any way to update part of a user-defined type in Oracle? Example: create or replace TYPE MY_TYPE AS OBJECT

Is there any way to update part of a user-defined type in Oracle?

Example:

create or replace TYPE MY_TYPE AS OBJECT
(
    VAR_1          NUMBER,
    VAR_2          DATE,
    VAR_3          NUMBER,开发者_JAVA百科
    VAR_4          DATE
);

Sample Table:

create TABLE TEST_TABLE
(
    TBL_ID          NUMBER,
    MY_DATA         MY_TYPE
);

Is there any way to do something like the following:

UPDATE TEST_TABLE SET MY_DATA.VAR_3 = 1;

Thanks!


Yes but for some reason you need to alias the table:

UPDATE TEST_TABLE T SET T.MY_DATA.VAR_3 = 1;
0

精彩评论

暂无评论...
验证码 换一张
取 消