删除嵌套表类型列的元素值

来源:互联网 发布:淘宝五星好评模板 编辑:程序博客网 时间:2024/05/22 14:28
SQL> create or replace type nt is table of varchar2(20);
  2  /
Type created


SQL> create table tmp(id number,cont nt) nested table cont store as cont_tbl;
Table created


SQL> insert into tmp values(1,nt('a','b','c','d'));
1 row inserted


SQL> select * from table(select cont from tmp where id=1);
COLUMN_VALUE
--------------------
a
b
c
d


SQL> delete from table(select cont from tmp where id=1) where column_value='c';
1 row deleted


SQL> select * from table(select cont from tmp where id=1);
COLUMN_VALUE
--------------------
a
b
d


SQL> 
0 0
原创粉丝点击