Home > Database > Mysql Tutorial > Oracle中用游标更新字段值的面试题

Oracle中用游标更新字段值的面试题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 17:16:11
Original
1128 people have browsed it

如下表 SQLgt; set pagesize 60; SQLgt; run; 1* select * from employee NAME SALARY ---------- -

如下表

在这个表如果SALARY列小于2500 就加20%。这个很简单,但是要用把游标用进去就要如下思考了:

先建个游标,,遍历这个表在这个条件的数据。

SQL> create or replace procedure emp_test is v_name employee.name%type; v_sal employee.salary%type; cursor cursor_sal is select name,salary from employee where salarylinux
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template