Oracle 9i PL/SQL程序设计的随书源码

源代码在线查看: update.sql

软件大小: 133 K
上传用户: gankai1983
关键词: Oracle SQL 9i PL
下载地址: 免注册下载 普通下载 VIP

相关代码

				REM update.sql
				REM Chapter 4, Oracle9i PL/SQL Programming by Scott Urman
				REM This block demonstrates some UPDATE statements.
				
				DECLARE
				  v_Major           students.major%TYPE;
				  v_CreditIncrease  NUMBER := 3;
				BEGIN
				  -- This UPDATE statement will add 3 to the current_credits
				  -- field of all students who are majoring in History.
				  v_Major := 'History';
				  UPDATE students
				    SET current_credits = current_credits + v_CreditIncrease
				    WHERE major = v_Major;
				    
				  -- This UPDATE statement will update both columns of
				  -- temp_table, for all rows.
				  UPDATE temp_table
				    SET num_col = 1, char_col = 'abcd';
				END;
				/
				
							

相关资源