Added DDL Script
This commit is contained in:
parent
c2ed485d65
commit
4ed642350c
@ -2,9 +2,10 @@
|
|||||||
This repostiory contains examples which might be used to show/explain why and when deadlocks happen in MSSQL.
|
This repostiory contains examples which might be used to show/explain why and when deadlocks happen in MSSQL.
|
||||||
|
|
||||||
# How to
|
# How to
|
||||||
1. Open two different SQL sessions.
|
1. Create example tables using ddl-script.sql
|
||||||
2. In each session open one file.
|
2. Open two different SQL sessions.
|
||||||
3. Run SQL commands according to comments.
|
3. In each session open one file.
|
||||||
|
4. Run SQL commands according to comments.
|
||||||
|
|
||||||
For example - running Read Commited should look like:
|
For example - running Read Commited should look like:
|
||||||
|
|
||||||
|
24
ddl-script.sql
Normal file
24
ddl-script.sql
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
CREATE TABLE Wycieczki
|
||||||
|
(
|
||||||
|
kraj VARCHAR(10),
|
||||||
|
cena MONEY
|
||||||
|
);
|
||||||
|
|
||||||
|
INSERT INTO
|
||||||
|
Wycieczki
|
||||||
|
VALUES
|
||||||
|
('Ateny', 1000),
|
||||||
|
('Bangkok', 3000);
|
||||||
|
|
||||||
|
CREATE TABLE Bilety
|
||||||
|
(
|
||||||
|
idBiletu int,
|
||||||
|
kraj VARCHAR(10),
|
||||||
|
l_osób int,
|
||||||
|
cena MONEY
|
||||||
|
);
|
||||||
|
|
||||||
|
INSERT INTO
|
||||||
|
Bilety
|
||||||
|
VALUES
|
||||||
|
(1, 'Ateny', 1, 1000);
|
Loading…
Reference in New Issue
Block a user