locksession2.sql

来自「介绍Oracle PL SQL编程」· SQL 代码 · 共 28 行

SQL
28
字号
/*
 * LockSession2.sql
 * Chapter 4, Oracle10g PL/SQL Programming
 * by Ron Hardman, Mike McLaughlin, Scott Urman
 *
 * This script demonstrates how transactions use locks, commits, and rollbacks
 *  This script is for the second session as noted in the book.
 */


PROMPT
PROMPT
PROMPT ** Query the AUTHORS table to see if the change from session 1 can be seen
PROMPT

SELECT first_name
FROM authors
WHERE id = 44;

PROMPT
PROMPT
PROMPT ** Try updating the same record from this session - IT SHOULD HANG
PROMPT

UPDATE authors
SET first_name = 'Ronald'
WHERE id = 44;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?