Beruflich Dokumente
Kultur Dokumente
PL/SQL
5-5
Using Cursors for Update
PLSQL S5L5 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 3
Using Cursors for Update
Purpose
PLSQL S5L5 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 4
Using Cursors for Update
Declaring a Cursor with the FOR UPDATE
Syntax
• This does not prevent other users from reading the rows.
PLSQL S5L5 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 5
Using Cursors for Update
Declaring a Cursor with the FOR UPDATE
Clause
PLSQL S5L5 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 6
Using Cursors for Update
NOWAIT Keyword in the FOR UPDATE
Clause Example
PLSQL S5L5 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 7
Using Cursors for Update
NOWAIT Keyword in the FOR UPDATE
Clause
PLSQL S5L5 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 8
Using Cursors for Update
FOR UPDATE OF column-name Example
PLSQL S5L5 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 9
Using Cursors for Update
WHERE CURRENT OF Clause Syntax
PLSQL S5L5 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 10
Using Cursors for Update
WHERE CURRENT OF Clause
PLSQL S5L5 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 11
Using Cursors for Update
WHERE CURRENT OF Clause Example
PLSQL S5L5 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 12
Using Cursors for Update
NOWAIT, FOR UPDATE, and WHERE
CURRENT OF Clause
PLSQL S5L5 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 13
Using Cursors for Update
FOR UPDATE Second Example
PLSQL S5L5 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 14
Using Cursors for Update
Terminology
PLSQL S5L5 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 15
Using Cursors for Update
Summary
PLSQL S5L5 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 16
Using Cursors for Update