aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonatas Adamonis <dona0169@edu.easj.dk>2017-05-10 10:43:55 +0200
committerDonatas Adamonis <dona0169@edu.easj.dk>2017-05-10 10:43:55 +0200
commitdfae63b5e9d20a4a94489e2b45c3b907896bb4fc (patch)
treedbfc2881703cdf6ccbd4c9fa7d9ebf84346d5cc4 /Test queries
parenta967beb3f0bc36ef4da2831a9755bca3d6530958 (diff)
parent3bb2b6b33225463abaa881c7562cdc0a39c5ce5e (diff)
asd
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