diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c76d08a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +projectnotes.md* diff --git a/non_usa_customers.sql b/non_usa_customers.sql new file mode 100644 index 0000000..1aaf752 --- /dev/null +++ b/non_usa_customers.sql @@ -0,0 +1,2 @@ +SELECT CustomerId, FirstName, Country FROM CUSTOMER +WHERE COUNTRY != 'USA'; \ No newline at end of file diff --git a/project_notes.md b/project_notes.md new file mode 100644 index 0000000..ddaa6bc --- /dev/null +++ b/project_notes.md @@ -0,0 +1,26 @@ +# Project Notes - SQL Interlude - U + +## Questions +### How to use NOT in queries +Why does + +``` +SELECT * FROM CUSTOMER +WHERE COUNTRY NOT LIKE 'USA'; +``` + +work and + +``` +SELECT * FROM CUSTOMER +WHERE COUNTRY NOT 'USA'; +``` +does not work? + +### Answer +To avoid using like +`WHERE NOT customer.country = "USA";`
+or
+`WHERE NOT != "USA";`
+ +are valid ways of forming the query. \ No newline at end of file