diff options
author | marcinzelent <marcin@zelent.net> | 2017-05-09 13:12:04 +0200 |
---|---|---|
committer | marcinzelent <marcin@zelent.net> | 2017-05-09 13:12:04 +0200 |
commit | a024229beab6fe9230a964529979e56cbfefdb6c (patch) | |
tree | c43c6c30eb01fc27d7dd78aadbfda26dff15ddfc | |
parent | d3a65ef8c1554f7b5304de190a88a7b536851304 (diff) |
Added test queries.
-rw-r--r-- | Test queries/deleteapartmentanduser.sql | 2 | ||||
-rw-r--r-- | Test queries/insertapartmentanduser.sql | 2 | ||||
-rw-r--r-- | Test queries/selectapartmentanduser.sql | 1 | ||||
-rw-r--r-- | Test queries/updateapartmentanduser.sql | 2 |
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 |