READ UNCOMMITTED (the lowest level of isolation transaction, only guaranteed not to read physically corrupted data)
Read Committed (the default level of the database engine)
REPEATABLE READ
Serializable (the highest level of isolation transactions, complete isolation between transactions)
Can be serialized more rigorous, high level;
Mysql
MySQL default transaction level is ' Repeatable-read ', which is repeatable read
1. View the current session isolation level
SELECT @ @tx_isolation;
2. View the current isolation level of the system
SELECT @ @global. tx_isolation;
3. Set the current session isolation level
Set session transaction Isolatin level repeatable read;
4. Set the current isolation level of the system
Set global transaction ISOLATION level repeatable read;
Oracle
The Oracle database supports both transaction isolation levels of Read COMMITTED and serializable.
The default system transaction isolation level is read COMMITTED, which reads committed
1. View the system default transaction isolation level, which is also the current session isolation level
--Create a transaction first
Declare
trans_id Varchar2 (100);
Begin
trans_id: = dbms_transaction.local_transaction_id (TRUE);
End
--View Transaction ISOLATION LEVEL
SELECT S.sid, s.serial#,
Case Bitand (T.flag, POWER (2, 28))
When 0 Then ' READ COMMITTED '
ELSE ' SERIALIZABLE '
END as Isolation_level
From V$transaction t
JOIN v$session s on t.addr = s.taddr and S.sid = Sys_context (' USERENV ', ' Sid ');
SQL Server
The default system transaction isolation level is read Committed, which reads committed
1. View the current isolation level of the system
DBCC useroptions
Isolation level The value of this item is both the current isolation levels setting
2. Set the current isolation level of the system
SET TRANSACTION Isolation level Read uncommitted;
Where READ uncommitted is the value you want to set
Default transaction isolation level in Mysql,oracle,sql server view, change