Oracle SELECT with an array using an IN
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
declare -- CREATE OR REPLACE TYPE PROD_TYPES.TYPE_NUMBER_ARRAY AS TABLE OF NUMBER nt_src prod_types.type_number_array := PROD_TYPES.TYPE_NUMBER_ARRAY(); -- Constructor nt_dest prod_types.type_number_array := PROD_TYPES.TYPE_NUMBER_ARRAY(); -- Constructor begin -- Test data (no order) select product_version_id bulk collect into nt_src from product_version v
where v.product_version_id between 138120 and 140000;
-- select * from table(sys.dbms_debug_vc2coll(1,2,'a')) order by 1 desc -- Data ordered select product_version_id bulk collect into nt_dest from product_version where product_version.product_version_id in ( select column_value from table ( cast (nt_src AS prod_types.type_number_array)))
order by
product_version.expiration_date2 desc , product_version.base_price desc , product_version.expiration_date2 desc ; for i in nt_dest. first .. nt_dest. last loop
dbms_output.put_line(to_char(nt_dest(i))); end loop;
exception when others then
dbms_output.put_line( 'sqlerrm : ' ||sqlerrm); |
相关推荐
Oracle中的select into Oracle中没有select into的用法! 在某些数据库中有select into的用法,用法是: select valueA,valueB into tableB from tableA; 上面这句语句的意思是将tableA表中的valueA和valueB字段的值...
Oracle 动态SQL介绍以及using用法示例
oracle数据库startwith用法
Oracle SQL Tuning with Oracle SQLTXPLAIN: Oracle Database 12c Edition by Stelios Charalambides English | 8 May 2017 | ISBN: 1484224353 | 408 Pages | PDF | 24.39 MB Learn through this practical guide ...
ORACLE INSERT INTO SELECT *FROM 分批提交例子
Oracle SQL语法不支持select top 100 * from table_a之类的top语法,当然可以使用rownum取出多少行来看,但是如果加上排序还使用这个rownum的话,大部分情况是,先取出rownum行记录,然后排序再显示,这和我们要求的...
using ADO with Oracle In Delphi MSWord Document
oracle-select
Oracle Order Management Using Oracle Workflow in Oracle Order Management Release 11i Part No. A96689-0
with tt as ( select '0' as pid, '1' as id, '1' as name from dual union all select '1' as pid, '2' as id, '2' as name from dual union all select '1' as pid, '3' as id, '3' as name from dual union...
官方资料:白皮书[英文]Oracle Database 1 2c Multitenant Snapshot Clones Using Oracle CloudFS Oracle Multitenant Architecture.;Oracle CloudFS Architecture;Oracle ASM Dynamic Volume Manager (ADVM);Oracle...
oracle select group 子查询 表连接
NULL 博文链接:https://bchen.iteye.com/blog/1632845
OracleSelect小工具, 不用安装说明插件就可以连上oracle并执行语句,用于验证是否可以正常连接到Oracle数据库
Oracle Solaris 11.3 Creating and Using Oracle Solaris Kernel Zones-88
Oracle Solaris 11.3 Creating and Using Oracle Solaris 10 Zones-52
Oracle Solaris 11.2 Creating and Using Oracle Solaris Kernel Zones-48
Oracle Solaris 11.1 Connecting Systems Using Reactive Network Configuration in Oracle Solaris11.1-118
Oracle Solaris 11.1 Connecting Systems Using Fixed Network Configuration in Oracle Solaris11.1-76
Data Science Automation Using Oracle Data Miner and Oracle R Enterprise starts with an introduction to business analytics, covering why automation is necessary and the level of complexity in ...