create or replace procedure test_score(input in number,output out char) is

begin

       if input>=90 then
begin
output := 'A';
end;
end if; if input<90 then
begin
output := 'B';
end;
end if; if input<80 then
begin
output := 'C';
end;
end if; if input<70 then
begin
output := 'D';
end;
end if; if input<60 then
begin
output := 'E';
end;
end if; dbms_output.put_line('成绩为:'||output);
end test_score;

调用:

declare
sr number;--输入参数
sc char;--输出参数
begin
sr := 70;
test(sr,sc);
end;

结果:

成绩为:C

SQL——存储过程实例 调用带参数的过程(成绩输出)的更多相关文章

  1. C#线程调用带参数的方法

    在 .NET Framework 2.0 版中,要实现线程调用带参数的方法有两种办法.第一种:使用ParameterizedThreadStart.调用 System.Threading.Thread ...

  2. addEventListener调用带参数函数

    当传递参数值时,使用"匿名函数"调用带参数的函数: <body> <button id="btn">click me</butto ...

  3. Java程序调用带参数的shell脚本返回值

    Java程序调用带参数的shell脚本返回值 首先来看看linux中shell变量(\(#,\)@,$0,$1,\(2)的含义解释 变量说明: -  \)$  Shell本身的PID(ProcessI ...

  4. bat调用带参数存储过程

    @bat调用sql文件 sqlplus user/pass@orcl @F:\factory.sql @将所有的存储过程封装在sql中 factory.sql:exec pro_factory(&am ...

  5. 在Java中调用带参数的存储过程

    JDBC调用存储过程: CallableStatement 在Java里面调用存储过程,写法那是相当的固定: Class.forName(.... Connection conn = DriverMa ...

  6. ado.net 调用带参数的存储过程

    String connString = "Data Source = localhost; Initial Catalog = hkjc;User ID = sa;Pwd = 123&quo ...

  7. SQL server 存储过程 C#调用Windows CMD命令并返回输出结果 Mysql删除重复数据保留最小的id C# 取字符串中间文本 取字符串左边 取字符串右边 C# JSON格式数据高级用法

    create proc insertLog@Title nvarchar(50),@Contents nvarchar(max),@UserId int,@CreateTime datetimeasi ...

  8. SQL存储过程的调用及写法

    调用函数: public class SqlProcess { ; public DataSet ReturnSet = null; public SqlDataAdapter adapter = n ...

  9. SQL存储过程来调用webservice

    如果用存储过程来调用webservice 那存储过程的功能感觉能做好多事情了? 别自欺欺人了.那些功能还是webservice来实现的... 完整的webservice代码:(也是默认的,新建.asm ...

随机推荐

  1. dubbo 学习

    1. dubbo Can not lock the registry cache file: 当本地同时启动服务端和客户端的时候就可能产生这个问题. 解决方案 Dubbo通过注册中心发现服务,发现的服 ...

  2. asp显示多条记录的代码

    asp显示多条记录的代码 仅供参考 <%for i=1 to RS.PageSize%> <% if RS.EOF then exit for end if %> <tr ...

  3. mmap DMA【转】

    转自:http://blog.csdn.net/lihaoweiv/article/details/6275241 第 13 章  mmap 和 DMA 本章将深入探讨 Linux 内存管理部分,并强 ...

  4. android:layout_gravity和android:gravity属性的区别

    一.介绍: gravity的中文意思就是”重心“,就是表示view横向和纵向的停靠位置 (1).android:gravity:是对view控件本身来说的,是用来设置view本身的内容应该显示在vie ...

  5. win10 python nltk安装

    主要是参照http://www.tuicool.com/articles/VFf6Bza

  6. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.3.1:jar (default-jar) on

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.3.1:jar (default-jar) on ...

  7. java 判断某一天是当年的哪一天

    题目:输入年份,月份,日,判断这一天是这一年的第几天?(闰年的2月份为29天,平年为28天) public class Runnian { /** * 能被4整除且不能被100整除或者能被400整除的 ...

  8. [ios][swift]Swift类型之间转换

    http://www.ruanman.net/swift/learn/4741.html

  9. SDUT 2416:Fruit Ninja II

    Fruit Ninja II Time Limit: 5000MS Memory limit: 65536K 题目描述 Have you ever played a popular game name ...

  10. poj1987 Distance Statistics

    普通dfs访问每个点对的复杂度是O(n^2)的,显然会超时. 考虑访问到当前子树的根节点时,统计所有经过根的点(u, v)满足: dist(u) + dist(v) <= maxd,并且 bel ...