aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulius Klezys <paul4618@edu.easj.dk>2017-05-10 09:22:54 +0200
committerPaulius Klezys <paul4618@edu.easj.dk>2017-05-10 09:22:54 +0200
commit3bb2b6b33225463abaa881c7562cdc0a39c5ce5e (patch)
tree354e6489227670263953e1ba41653ea7ff0d7f02 /Test queries
parent753a8c8685afb04e0289b3b4cfbd628a8cbaa8cb (diff)
parente720bee61ae7a045606ecea09f421dfdf5ef371a (diff)
Merge branch 'master' of https://github.com/marcinzelent/ApartmentAdmin
Diffstat (limited to 'Test queries')
-rw-r--r--Test queries/deleteapartmentanduser.sql2
-rw-r--r--Test queries/insertapartmentanduser.sql2
-rw-r--r--Test queries/selectapartmentanduser.sql1
-rw-r--r--Test queries/updateapartmentanduser.sql2
4 files changed, 7 insertions, 0 deletions
diff --git a/Test queries/deleteapartmentanduser.sql b/Test queries/deleteapartmentanduser.sql
new file mode 100644
index 0000000..754b098
--- /dev/null
+++ b/Test queries/deleteapartmentanduser.sql
@@ -0,0 +1,2 @@
+DELETE FROM Users WHERE ApartmentNr=3;
+DELETE FROM Apartments WHERE ApartmentNumber=3; \ No newline at end of file
diff --git a/Test queries/insertapartmentanduser.sql b/Test queries/insertapartmentanduser.sql
new file mode 100644
index 0000000..af06738
--- /dev/null
+++ b/Test queries/insertapartmentanduser.sql
@@ -0,0 +1,2 @@
+INSERT INTO Apartments VALUES(3,30,2,'200Dkk',1,'Adres')
+INSERT INTO Users(ApartmentNr,Username,Password,Type,FirstName,LastName,BirthDate,Phone,Email) VALUES(3,'nuser','pass','N','Jan','Kowalski','01/01/1970','34567890','jan@onet.pl') \ No newline at end of file
diff --git a/Test queries/selectapartmentanduser.sql b/Test queries/selectapartmentanduser.sql
new file mode 100644
index 0000000..a3f7ffd
--- /dev/null
+++ b/Test queries/selectapartmentanduser.sql
@@ -0,0 +1 @@
+SELECT * FROM Apartments LEFT JOIN Users ON Apartments.ApartmentNumber=Users.ApartmentNr WHERE Users.LastName='Kowalski' \ No newline at end of file
diff --git a/Test queries/updateapartmentanduser.sql b/Test queries/updateapartmentanduser.sql
new file mode 100644
index 0000000..3ab4192
--- /dev/null
+++ b/Test queries/updateapartmentanduser.sql
@@ -0,0 +1,2 @@
+UPDATE Apartments SET MonthlyCharge='5000' WHERE Size=30
+UPDATE Users SET LastName='Nowak' WHERE ApartmentNr=3; \ No newline at end of file