sql 游标的使用—游标FOR循环小例子
16lz
2022-01-12
例子: 显示emp表所有雇员名及其工资:
复制代码 代码如下:
declare
cursor emp_cursor is select ename,sal from emp ;
begin
for emp_record in emp_cursor loop
dbms_output.put_line('姓名: '||emp_record.ename||' , 工资: '||emp_record.sal);
end loop;
end ;
/
anonymous block completed
姓名: SMITH , 工资: 880
姓名: ALLEN , 工资: 1600
姓名: WARD , 工资: 1250
姓名: JONES , 工资: 3272.5
姓名: MARTIN , 工资: 1250
姓名: BLAKE , 工资: 2850
姓名: CLARK , 工资: 2450
姓名: SCOTT , 工资: 2000
姓名: KING , 工资: 5000
姓名: TURNER , 工资: 1500
姓名: ADAMS , 工资: 1210
姓名: JAMES , 工资: 950
姓名: FORD , 工资: 3300
姓名: MILLER , 工资: 2100
更多相关文章
- [Android(安卓)NDK]Android(安卓)JNI开发例子 ---3 在JNI中实现o
- Android调用天气预报的WebService简单例子
- Android(安卓)中文API(86)——ResourceCursorAdapter
- Android(安卓)SDK 1.0 电话号码的例子(Demo)
- Android例子—直接通过Binder的onTransact完成跨进程通信
- gson使用在android使用例子
- Android(安卓)文件存储--内部存储的例子
- Android适配器之------BaseAdapter(例子)
- android 处理http例子