Compare commits

...

1 Commits

Author SHA1 Message Date
Maksymilian Lúmenn Stachowiak
4ed642350c Added DDL Script 2023-12-12 17:50:19 +01:00
2 changed files with 28 additions and 3 deletions

View File

@ -2,9 +2,10 @@
This repostiory contains examples which might be used to show/explain why and when deadlocks happen in MSSQL.
# How to
1. Open two different SQL sessions.
2. In each session open one file.
3. Run SQL commands according to comments.
1. Create example tables using ddl-script.sql
2. Open two different SQL sessions.
3. In each session open one file.
4. Run SQL commands according to comments.
For example - running Read Commited should look like:

24
ddl-script.sql Normal file
View 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);