search
Homephp教程PHP开发SQL Server lock type

SQL Server lock type

Nov 23, 2016 pm 02:29 PM

(1) HOLDLOCK: Keep the shared lock on the table until the entire transaction ends, instead of releasing the added lock immediately after the statement is executed.

(2) NOLOCK: Do not add shared locks and exclusive locks. When this option takes effect, uncommitted read data or "dirty data" may be read. This option only applies to SELECT statements. ​

(3) PAGLOCK: Specify to add a page lock (otherwise a table lock may usually be added). ​​

(4) READCOMMITTED performs the scan with the same lock semantics as a transaction running at the read-commit isolation level. By default, SQL Server 2000 operates at this isolation level.

(5) READPAST: Skip locked data rows. This option will cause the transaction to skip data rows that have been locked by other transactions when reading data, instead of blocking until other transactions release the lock. READPAST only applies to SELECT statement operation in transaction operation under READ COMMITTED isolation level.​ ​

(6) READUNCOMMITTED: Equivalent to NOLOCK. ​​

(7) REPEATABLEREAD: Set the transaction to the repeatable read isolation level. ​​

(8) ROWLOCK: Use row-level locks instead of coarser-grained page-level locks and table-level locks.​ ​​

(9) SERIALIZABLE: Perform scans with the same lock semantics as transactions running at the serializable read isolation level. Equivalent to HOLDLOCK.

(10) TABLOCK: Specify the use of table-level locks instead of row-level or page-level locks. SQL Server releases this lock after the statement is executed. If HOLDLOCK is also specified, the lock will be maintained until this transaction. Finish.

(11) TABLOCKX: Specify the use of an exclusive lock on the table. This lock can prevent other transactions from reading or updating data in this table until the statement or the entire transaction ends.

(12) UPDLOCK: Specifies to set an update lock (update lock) instead of setting a shared lock when reading data in the table. The lock is maintained until the end of this statement or the entire transaction. The function of using UPDLOCK is to allow the user to read the data first ( and does not block other users from reading data), and ensures that when the data is updated later, the data has not been modified by other users during this period of time.


Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software