删除嵌套表类型列的元素值
2016-02-15 16:23
211 查看
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>
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>
相关文章推荐
- POJ3686 KM最大权匹配+高难度建图
- js基础篇——call/apply、arguments、undefined/null
- 2016.2.15 16年第一天上班 ZooKeeper集群的安装、配置
- Android应用程序权限机制的源代码分析(1)
- 重写前奏~继承和多态
- iOS 利用CoreLocation和MapKit开发搜索附近的商场功能
- js基础篇——call/apply、arguments、undefined/null
- mongodb java driver3.0初探
- Java 高并发缓存与Guava Cache
- Dubbo与Zookeeper、SpringMVC整合和使用(负载均衡、容错)
- _exit 和 exit的区别
- 开机需要重新设置默认网关
- DB2操作流程
- 获取日期Date年月日
- 深入浅出Python装饰器
- Android的四大组件——Activity
- jquery.validate 自定义验证方法
- HTML5物理游戏开发 - 越野山地自行车(二)创建一辆可操控的自行车
- iOS之UIRefreshControl系统下拉刷新
- background-image背景图片拉伸平铺