From a024229beab6fe9230a964529979e56cbfefdb6c Mon Sep 17 00:00:00 2001 From: marcinzelent Date: Tue, 9 May 2017 13:12:04 +0200 Subject: Added test queries. --- Test queries/deleteapartmentanduser.sql | 2 ++ Test queries/insertapartmentanduser.sql | 2 ++ Test queries/selectapartmentanduser.sql | 1 + Test queries/updateapartmentanduser.sql | 2 ++ 4 files changed, 7 insertions(+) create mode 100644 Test queries/deleteapartmentanduser.sql create mode 100644 Test queries/insertapartmentanduser.sql create mode 100644 Test queries/selectapartmentanduser.sql create mode 100644 Test queries/updateapartmentanduser.sql (limited to 'Test queries') 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 -- cgit v1.2.3