代码语言
.
CSharp
.
JS
Java
Asp.Net
C
MSSQL
PHP
Css
PLSQL
Python
Shell
EBS
ASP
Perl
ObjC
VB.Net
VBS
MYSQL
GO
Delphi
AS
DB2
Domino
Rails
ActionScript
Scala
代码分类
文件
系统
字符串
数据库
网络相关
图形/GUI
多媒体
算法
游戏
Jquery
Extjs
Android
HTML5
菜单
网页交互
WinForm
控件
企业应用
安全与加密
脚本/批处理
开放平台
其它
【
PLSQL
】
oracle 存储过程 多表操作
作者:
Dezai.CN
/ 发布于
2011/8/7
/
926
<div> <pre><span style="color: rgb(0,0,0)">CREATE OR REPLACE Procedure P_WEB_MEMBERINFOR( p_memberid In Varchar2, member_Resultset In Out Pkg_Return_Resultset.Resultset, </span><span style="color: rgb(0,0,0)">--</span><span style="color: rgb(0,0,0)">返回结果集 money_Resultset In Out Pkg_Return_Resultset.Resultset, </span><span style="color: rgb(0,0,0)">--</span><span style="color: rgb(0,0,0)">返回结果集 point_Resultset In Out Pkg_Return_Resultset.Resultset, </span><span style="color: rgb(0,0,0)">--</span><span style="color: rgb(0,0,0)">返回结果集 email_Resultset In Out Pkg_Return_Resultset.Resultset </span><span style="color: rgb(0,0,0)">--</span><span style="color: rgb(0,0,0)">返回结果集)AsBegin Open member_Resultset For Select </span><span style="color: rgb(0,0,0)">*</span><span style="color: rgb(0,0,0)"> from T_WEB_BUYERMEMBERS Where MEMBERID </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> p_memberid; Open money_Resultset For Select </span><span style="color: rgb(0,0,0)">*</span><span style="color: rgb(0,0,0)"> From DD_YWXT.T_JS_YW_CZJL Where MEMBERID </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> p_memberid; Open point_Resultset For Select </span><span style="color: rgb(0,0,0)">*</span><span style="color: rgb(0,0,0)"> From T_WEB_POINT Where MEMBERID </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> p_memberid; Open email_Resultset For Select </span><span style="color: rgb(0,0,0)">*</span><span style="color: rgb(0,0,0)"> From T_WEB_EMAIL Where EMAILTO </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> p_memberid;End;</span></pre> C#调用 <div class="cnblogs_code"> <pre><span style="color: rgb(0,0,255)">public</span><span style="color: rgb(0,0,0)"> DataSet GetUserInfor(</span><span style="color: rgb(0,0,255)">string</span><span style="color: rgb(0,0,0)"> memberid) { OracleParameter[] parameters </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> { </span><span style="color: rgb(0,0,255)">new</span><span style="color: rgb(0,0,0)"> OracleParameter(</span><span style="color: rgb(128,0,0)">"</span><span style="color: rgb(128,0,0)">p_memberid</span><span style="color: rgb(128,0,0)">"</span><span style="color: rgb(0,0,0)">, OracleType.VarChar, </span><span style="color: rgb(128,0,128)">255</span><span style="color: rgb(0,0,0)">), </span><span style="color: rgb(0,0,255)">new</span><span style="color: rgb(0,0,0)"> OracleParameter(</span><span style="color: rgb(128,0,0)">"</span><span style="color: rgb(128,0,0)">member_Resultset</span><span style="color: rgb(128,0,0)">"</span><span style="color: rgb(0,0,0)">, OracleType.Cursor), </span><span style="color: rgb(0,0,255)">new</span><span style="color: rgb(0,0,0)"> OracleParameter(</span><span style="color: rgb(128,0,0)">"</span><span style="color: rgb(128,0,0)">money_Resultset</span><span style="color: rgb(128,0,0)">"</span><span style="color: rgb(0,0,0)">, OracleType.Cursor), </span><span style="color: rgb(0,0,255)">new</span><span style="color: rgb(0,0,0)"> OracleParameter(</span><span style="color: rgb(128,0,0)">"</span><span style="color: rgb(128,0,0)">point_Resultset</span><span style="color: rgb(128,0,0)">"</span><span style="color: rgb(0,0,0)">, OracleType.Cursor), </span><span style="color: rgb(0,0,255)">new</span><span style="color: rgb(0,0,0)"> OracleParameter(</span><span style="color: rgb(128,0,0)">"</span><span style="color: rgb(128,0,0)">email_Resultset</span><span style="color: rgb(128,0,0)">"</span><span style="color: rgb(0,0,0)">, OracleType.Cursor), }; parameters[</span><span style="color: rgb(128,0,128)">0</span><span style="color: rgb(0,0,0)">].Value </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> memberid; parameters[</span><span style="color: rgb(128,0,128)">1</span><span style="color: rgb(0,0,0)">].Direction </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> ParameterDirection.Output; parameters[</span><span style="color: rgb(128,0,128)">2</span><span style="color: rgb(0,0,0)">].Direction </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> ParameterDirection.Output; parameters[</span><span style="color: rgb(128,0,128)">3</span><span style="color: rgb(0,0,0)">].Direction </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> ParameterDirection.Output; parameters[</span><span style="color: rgb(128,0,128)">4</span><span style="color: rgb(0,0,0)">].Direction </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> ParameterDirection.Output; </span><span style="color: rgb(0,0,255)">return</span><span style="color: rgb(0,0,0)"> DbHelperOra.RunProcedureCXF(</span><span style="color: rgb(128,0,0)">"</span><span style="color: rgb(128,0,0)">P_WEB_MEMBERINFOR</span><span style="color: rgb(128,0,0)">"</span><span style="color: rgb(0,0,0)">, parameters, </span><span style="color: rgb(128,0,0)">"</span><span style="color: rgb(128,0,0)">ds</span><span style="color: rgb(128,0,0)">"</span><span style="color: rgb(0,0,0)">); } </span><span style="color: rgb(0,0,255)">public</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">static</span><span style="color: rgb(0,0,0)"> DataSet RunProcedureCXF(</span><span style="color: rgb(0,0,255)">string</span><span style="color: rgb(0,0,0)"> storedProcName, IDataParameter[] parameters, </span><span style="color: rgb(0,0,255)">string</span><span style="color: rgb(0,0,0)"> tableName) { </span><span style="color: rgb(0,0,255)">using</span><span style="color: rgb(0,0,0)"> (OracleConnection connection </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">new</span><span style="color: rgb(0,0,0)"> OracleConnection(connectionString)) { DataSet dataSet </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">new</span><span style="color: rgb(0,0,0)"> DataSet(); connection.Open(); OracleDataAdapter sqlDA </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">new</span><span style="color: rgb(0,0,0)"> OracleDataAdapter(); sqlDA.SelectCommand </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> BuildQueryCommand(connection, storedProcName, parameters); sqlDA.Fill(dataSet); connection.Close(); </span><span style="color: rgb(0,0,255)">return</span><span style="color: rgb(0,0,0)"> dataSet; } }</span></pre> </div> </div>
试试其它关键字
oracle
存储过程
同语言下
.
查看某张表的表结构
.
oracle 集合操作
.
for 循环中倒序 用reverse
.
Oracle 临时表空间收缩
.
查看session及其对应运行的sql
.
Oracle常用查看表结构命令
.
Oracle Connect By Prior用法(实现递归查询)
.
重置排序 SEQUENCE
.
创建一个trigger
.
批量替换字段中的字符
可能有用的
.
C#实现的html内容截取
.
List 切割成几份 工具类
.
SQL查询 多列合并成一行用逗号隔开
.
一行一行读取txt的内容
.
C#动态修改文件夹名称(FSO实现,不移动文件)
.
c# 移动文件或文件夹
.
c#图片添加水印
.
Java PDF转换成图片并输出给前台展示
.
网站后台修改图片尺寸代码
.
处理大图片在缩略图时的展示
Dezai.CN
贡献的其它代码
(
4037
)
.
多线程Socket服务器模块
.
生成随机密码
.
清除浮动样式
.
弹出窗口居中
.
抓取url的函数
.
使用base HTTP验证
.
div模拟iframe嵌入效果
.
通过header转向的方法
.
Session操作类
.
执行sqlite输入插入操作后获得自动编号的ID
Copyright © 2004 - 2024 dezai.cn. All Rights Reserved
站长博客
粤ICP备13059550号-3