Using lock table, PL-SQL Programming

Assignment Help:

Using LOCK TABLE

You use the LOCK TABLE statement to lock the whole database tables in the specified lock mode so that you can share or deny the access to them. For illustration, the statement below locks the emp table in the row share mode. The Row share locks permit concurrent access to the table; they avoid other users from locking the whole table for the restricted use. The Table locks are released when your transaction issues a commit or rollback.

LOCK TABLE emp IN ROW SHARE MODE NOWAIT;

The lock mode determines what other locks can be located on the table. For illustration, many users can obtain the row share locks on the table at the same time, excluding only one user at a time can obtain an exclusive lock. Whereas one user has an exclusive lock on the table, no other users can insert, delete, and update rows in that table.


Related Discussions:- Using lock table

%rowtype - cursors, %ROWTYPE: This attribute gives a record type which ...

%ROWTYPE: This attribute gives a record type which represents a row in the database table or a row fetched from a formerly declared cursor. The Fields in the record and corresp

Use of table expressions - expressing constraint conditions, Use of Table E...

Use of Table Expressions - Expressing Constraint Conditions With the exception of key constraints, the examples in the theory book all explicitly reference at least one relvar

Logical operators-pl/sql expressions , Logical Operators The logical op...

Logical Operators The logical operators AND, NOT, and OR follow the tri-state logic shown in table below. The AND and OR are binary operators; NOT is a unary operator.

Scope rules - user-defined exceptions, Scope Rules You cannot declare ...

Scope Rules You cannot declare an exception twice in the similar block. Though, you can, declare the similar exception in 2 different blocks. The Exceptions declared in a bloc

Keyword & parameter description - exception_init pragma, Keyword & Paramete...

Keyword & Parameter Description: PRAGMA: These keywords signify that the statement is a pragma (i.e. compiler directive). The Pragmas are processed at the compile time, n

Variables and constants in pl/sql, V ariables and Constants in PL/SQL ...

V ariables and Constants in PL/SQL The PL/SQL permits you to declare constants and variables, and then use them in SQL and procedural statements anywhere in the expression. Th

Inner join, Inner Join We have learned how to retrieve data from one t...

Inner Join We have learned how to retrieve data from one table by using SELECT statement. But, as we have learned, normalized relational databases mean the data is spread betw

Is null operator-comparison operators, IS NULL Operator The IS NULL oper...

IS NULL Operator The IS NULL operator returns the Boolean value TRUE whenever its operand is null or FALSE if it is not null. The comparisons including the nulls always yield NU

Using count, Using COUNT The COUNT returns the number of elements that...

Using COUNT The COUNT returns the number of elements that a collection presently contains. For instance, when a varray projects contains 15 elements, then the following IF con

Fetching with a cursor, Fetching with a Cursor The FETCH statements re...

Fetching with a Cursor The FETCH statements retrieve the rows in the result set one at a time. After each and every fetch, the cursor advance to the next row in the result set

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd