Please enable JavaScript.
Coggle requires JavaScript to display documents.
SQL - Queries (WHERE: restrict our query results n order to obtain only…
SQL - Queries
-
-
CASE statement allows us to create different outputs ---It is SQL's way of handling if-then logic --- CASE statement must end with END
-
-
-
-
-
AS is a keyword in SQL that allows you to rename a column or table using an alias --- the columns have not been renamed in the table. The aliases only appear in the result.
-
LIKE is a special operator used with the WHERE clause to search for a specific pattern in a column --- _ means you can substitute any individual character here without breaking the pattern --- % is another wildcard character that can be used with LIKE --- not case sensitive
NULL it is not possible to test for NULL values with comparison operators, such as = and != ---IS NULL, IS NOT NULL
Between: to filter the result set within a certain range --- BETWEEN two letters is not inclusive of the 2nd letter --- BETWEEN two numbers is inclusive of the 2nd number
-
-
LIMIT is a clause that lets you specify the maximum number of rows the result set will have --- saves space on our screen and makes our queries run faster