先准备好一个sql脚本demo.sql set serveroutput ondeclarev_name dept.dname%type;beginselect dname into v_name from dept whe
先准备好一个sql脚本demo.sql
set serveroutput on
declare
v_name dept.dname%type;
begin
select dname into v_name from dept where deptno=&1;
dbms_output.put_line('department name is: '||v_name);
end;
/
exit;
然后在终端下执行:
sqlplus "scott/tiger@orcl" @demo.sql 20
返回:
SQL*Plus: Release 9.2.0.4.0 - Production on Thu Oct 17 21:37:28 2013
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
该系统采用VS2005+SQL2000+Extjs2.0开发由于学extjs 一月不到 属初学者,项目有很多不足地方请见谅(注释不标准按自己想法随意注释了一下)数据库脚本:压缩包目录下.DB.sql便是该项目为双用户:管理员 与营业员 角色登陆显示不同信息数据库方面一小部分功能运用存储过程或者直接附加DB_51aspx下Sql数据库文件
0
old 4: select dname into v_name from dept where deptno=&1;
new 4: select dname into v_name from dept where deptno=20;
department name is: RESEARCH
PL/SQL procedure successfully completed.
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
注意:我们可以给脚本传参数,,在脚本中用&1,&2这样的参数
本文永久更新链接地址:

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号