参考:
update your_tb set your_fd='mirageTF' where your_fd like 'miage%';
update your_tb set your_fd='mirageTF' where your_fd like 'miage%';
解决方案 »
- 还有人熟悉oci开发的,需要写个接口程序
- oracle ora-01507 ora-01102错误 ,急
- ubuntu系统中运行java程序调用oracle 的sqlplus,为什么找不到sqlplus呢?
- 一个字段是rowid数据类型,执行插入时如何给它指定值
- 关于Oracle中使用的SQL语句,求救!!在线等待
- 两个数据库之间拷贝表结构和数据
- 急问:在Linux下安装Oracle9i出现以下错误!
- 统计问题2-联合查询的不完全显示,请帮助!!
- 如何Access数据库中的表的内容导入到Oracle数据库
- ORACLE jobs 执行问题,JOBS执行一段时间后失效。
- Oracle 8 与 8i功能上有何区别
- 求教时间相减问题
Specify FOR UPDATE to allow a subquery, primary key, object, or rowid materialized
view to be updated. When used in conjunction with Advanced Replication, these
updates will be propagated to the master.
see:
Oracle9i Replication
DECLARE
-- Number of credits to add to each student's total
v_NumCredits classes.num_credits%TYPE; -- This cursor will select only those students who are currently
-- registered for HIS 101.
CURSOR c_RegisteredStudents IS
SELECT *
FROM students
WHERE id IN (SELECT student_id
FROM registered_students
WHERE department= 'HIS'
AND course = 101)
FOR UPDATE OF current_credits;BEGIN
-- Set up the cursor fetch loop.
FOR v_StudentInfo IN c_RegisteredStudents LOOP
-- Determine the number of credits for HIS 101.
SELECT num_credits
INTO v_NumCredits
FROM classes
WHERE department = 'HIS'
AND course = 101; -- Update the row we just retrieved from the cursor.
UPDATE students
SET current_credits = current_credits + v_NumCredits
WHERE CURRENT OF c_RegisteredStudents;
END LOOP; -- Commit our work.
COMMIT;
END;
/