diff --git a/answers/exercise1.sql b/answers/exercise1.sql index e69de29..2831851 100644 --- a/answers/exercise1.sql +++ b/answers/exercise1.sql @@ -0,0 +1,2 @@ +CREATE SCHEMA myNewDB; +SHOW DATABASES; diff --git a/answers/exercise10.sql b/answers/exercise10.sql index e69de29..771de32 100644 --- a/answers/exercise10.sql +++ b/answers/exercise10.sql @@ -0,0 +1 @@ +SELECT*FROM Students WHERE City ='Philidelphia' OR City='Trenton'; diff --git a/answers/exercise11.sql b/answers/exercise11.sql index e69de29..1540c71 100644 --- a/answers/exercise11.sql +++ b/answers/exercise11.sql @@ -0,0 +1 @@ +SELECT*FROM Students ORDER BY City; \ No newline at end of file diff --git a/answers/exercise12.sql b/answers/exercise12.sql index e69de29..8263213 100644 --- a/answers/exercise12.sql +++ b/answers/exercise12.sql @@ -0,0 +1 @@ +SELECT*FROM Students ORDER BY City DESC; \ No newline at end of file diff --git a/answers/exercise13.sql b/answers/exercise13.sql index e69de29..80c1365 100644 --- a/answers/exercise13.sql +++ b/answers/exercise13.sql @@ -0,0 +1 @@ +SELECT*FROM Students ORDER BY Country,city; \ No newline at end of file diff --git a/answers/exercise14.sql b/answers/exercise14.sql index e69de29..e562e34 100644 --- a/answers/exercise14.sql +++ b/answers/exercise14.sql @@ -0,0 +1 @@ +SELECT * FROM Students WHERE PostalCode IS NULL; \ No newline at end of file diff --git a/answers/exercise15.sql b/answers/exercise15.sql index e69de29..f0ff0df 100644 --- a/answers/exercise15.sql +++ b/answers/exercise15.sql @@ -0,0 +1 @@ +SELECT * FROM Students WHERE PostalCode IS NOT NULL; \ No newline at end of file diff --git a/answers/exercise2.sql b/answers/exercise2.sql index e69de29..2a59f03 100644 --- a/answers/exercise2.sql +++ b/answers/exercise2.sql @@ -0,0 +1 @@ +DROP Database myNewDB; \ No newline at end of file diff --git a/answers/exercise3.sql b/answers/exercise3.sql index e69de29..510fe00 100644 --- a/answers/exercise3.sql +++ b/answers/exercise3.sql @@ -0,0 +1,2 @@ +CREATE TABLE USERS (USERID int,LastName varchar(255),FirstName varchar(255),Address varchar(255),City varchar(255)); +describe USERS; \ No newline at end of file diff --git a/answers/exercise4.sql b/answers/exercise4.sql index e69de29..2f22b4c 100644 --- a/answers/exercise4.sql +++ b/answers/exercise4.sql @@ -0,0 +1 @@ +DROP TABLE USERS; \ No newline at end of file diff --git a/answers/exercise5.sql b/answers/exercise5.sql index e69de29..966404d 100644 --- a/answers/exercise5.sql +++ b/answers/exercise5.sql @@ -0,0 +1 @@ +TRUNCATE TABLE USERS; \ No newline at end of file diff --git a/answers/exercise6.sql b/answers/exercise6.sql index e69de29..ec0caeb 100644 --- a/answers/exercise6.sql +++ b/answers/exercise6.sql @@ -0,0 +1 @@ +ALTER TABLE USERS ADD Birthday date; \ No newline at end of file diff --git a/answers/exercise7.sql b/answers/exercise7.sql index e69de29..0dd231c 100644 --- a/answers/exercise7.sql +++ b/answers/exercise7.sql @@ -0,0 +1 @@ +DELETE FROM USERS WHERE Birthday; diff --git a/answers/exercise9.sql b/answers/exercise9.sql index e69de29..07dac2a 100644 --- a/answers/exercise9.sql +++ b/answers/exercise9.sql @@ -0,0 +1 @@ +SELECT * FROM Students WHERE NOT City = 'Philidelphia'; \ No newline at end of file