sql 绑定变量问题
来源:互联网 发布:小刀网源码 编辑:程序博客网 时间:2024/04/28 03:16
SQL> create table T_BUSINESS_DATA(user_id number(16),status varchar2(2),oper_date date);select * from T_BUSINESS_DATA t where 1=1 and t.APP_USER_ID=:userId and t.STATUS <> 1 order by t.operDate descSQL> variable userId number; SQL> exec :userId := 1;PL/SQL procedure successfully completed.select * from T_BUSINESS_DATA t where 1 = 1 and t.user_id = :userId and t.STATUS <> 1 order by t.oper_date descSQL> select distinct user_id from T_BUSINESS_DATA; USER_ID---------- 1 2222 999 310select * from T_BUSINESS_DATA t where 1 = 1 and t.user_id = :userId and t.STATUS <> 2 order by t.oper_date desc; select * from T_BUSINESS_DATA t where 1 = 1 and t.user_id = :userId and t.STATUS <> 3 order by t.oper_date desc; select * from T_BUSINESS_DATA t where 1 = 1 and t.user_id = :userId and t.STATUS <> 4 order by t.oper_date desc; select * from T_BUSINESS_DATA t where 1 = 1 and t.user_id = :userId and t.STATUS <> 5 order by t.oper_date desc; SQL_TEXTSQL_IDEXECUTIONS1 select * from T_BUSINESS_DATA t where 1 = 1 and t.user_id = :userId and t.STATUS <> 4 order by t.oper_date desc2kykjpbwrbmxr12 select * from T_BUSINESS_DATA t where 1 = 1 and t.user_id = :userId and t.STATUS <> 3 order by t.oper_date desc8wqactbjt4vr513 select * from T_BUSINESS_DATA t where 1 = 1 and t.user_id = :userId and t.STATUS <> 5 order by t.oper_date desc9x1nbtnky71hd24select * from T_BUSINESS_DATA t where 1 = 1 and t.user_id = :userId and t.STATUS <> 1 order by t.oper_date desc03cr9uphjkkct15select * from T_BUSINESS_DATA t where 1 = 1 and t.user_id = :userId and t.STATUS <> 2 order by t.oper_date desc86y3ddg9wzhg116select * from T_BUSINESS_DATA t where 1 = 1 and t.user_id = :userId and t.STATUS <> 4 order by t.oper_date desca2f1chc53b5nq17select sql_text, sql_id, a.executions from v$sql a where a.parsing_schema_name = 'TEST' and sql_text like '%oper_date%' order by 1,last_active_time desc 1dwfvvkxmqn955有5种状态,就会在内存里存在5条sql cursor,这里不需要使用绑定变量。
阅读全文
0 0
- sql 绑定变量问题
- java中sql绑定变量的问题
- pl/sql 绑定变量
- Oracle sql绑定变量
- SQL绑定变量
- MySQL-SQL绑定变量
- PL/SQL Developer插件编程的绑定变量问题
- Oracle数据库SQL语句绑定变量一----性能问题
- 动态SQL与绑定变量
- 动态SQL及绑定变量
- 查看未绑定变量SQL
- java-sql 与 绑定变量
- Oracle PL/SQL 绑定变量
- 动态SQL使用绑定变量
- PHP使用SQL绑定变量
- SQL绑定变量的使用
- sql拼接与绑定变量
- 动态SQL和绑定变量
- Android 8.0 adb分析
- 排序算法-快速排序
- 自定义checkbox和radio的样式
- scala quill框架让事务起作用的方法
- Spark编程实战
- sql 绑定变量问题
- ora 06026 06023
- input输入框file类型选择同样输入框第二次不触发onchange事件的解决办法
- oracle安装时,条件检查不通过解决办法
- Apache Beam适时有状态计算
- 精度丢失引发的错误--笔记
- SQL之merge into 批量更新数据
- VS2015+opencv3.3配置
- ObjectMapper引用jar包问题