filmov
tv
07 MySQL Tutorial for Beginners: Logical Operators (AND, OR, NOT), NULL, IS NULL Clause

Показать описание
"Logical operators" enable us to use more than one condition in WHERE clause.
You use the AND "logical operator" to specify that the search must satisfy both of the conditions. In other words: both conditions must be true.
You can use "logical operators" in a WHERE clause to combine two or more search conditions into a compound condition.
You use the OR "logical operator" to specify that the search must satisfy at least one of the conditions.
In other words: only one of the conditions must be true.
You can use the NOT "logical operator" to negate a search condition.
The order of precedence for the logical operators affects the result of a search condition.
When MySQL evaluates a compound condition, it evaluates FIRST the AND operator and THEN the OR operator.
You can use parentheses to override the order of precedence.
If you want, you can use parentheses to clarify the sequence in which the operations are evaluated even if they're not needed for the expression to be evaluated properly, just as you can with arithmetic expressions.
A column can contain a NULL value. A NULL value is typically used to indicate that a value is not known, unavailable, or not applicable.
A NULL value is not the same as a zero or an empty string.
If you want to test for NULL values in search conditions, you have to use the IS NULL clause instead of the normal comparison operators.
A NULL value is not the same as a zero and as an empty string. The row that has a NULL value isn't included in the result set when numbers is NOT equal to zero as well. You can also use the NOT operator with the IS NULL clause.
EXERCISES for your SELF-TRAINING:
SCRIPT FOR THE EXAMPLES:
SUBSCRIBE!
FACEBOOK
GOOGLE+
You use the AND "logical operator" to specify that the search must satisfy both of the conditions. In other words: both conditions must be true.
You can use "logical operators" in a WHERE clause to combine two or more search conditions into a compound condition.
You use the OR "logical operator" to specify that the search must satisfy at least one of the conditions.
In other words: only one of the conditions must be true.
You can use the NOT "logical operator" to negate a search condition.
The order of precedence for the logical operators affects the result of a search condition.
When MySQL evaluates a compound condition, it evaluates FIRST the AND operator and THEN the OR operator.
You can use parentheses to override the order of precedence.
If you want, you can use parentheses to clarify the sequence in which the operations are evaluated even if they're not needed for the expression to be evaluated properly, just as you can with arithmetic expressions.
A column can contain a NULL value. A NULL value is typically used to indicate that a value is not known, unavailable, or not applicable.
A NULL value is not the same as a zero or an empty string.
If you want to test for NULL values in search conditions, you have to use the IS NULL clause instead of the normal comparison operators.
A NULL value is not the same as a zero and as an empty string. The row that has a NULL value isn't included in the result set when numbers is NOT equal to zero as well. You can also use the NOT operator with the IS NULL clause.
EXERCISES for your SELF-TRAINING:
SCRIPT FOR THE EXAMPLES:
SUBSCRIBE!
GOOGLE+
Комментарии