Flashcards
Untitled
Cards in this deck (51)
- 1Logical ANDAND, &&
- 2Assign a value (as part of a SET statement, or as part of the SET clause in an UPDATE statement)=
mysql> SELECT 1 = 1, NULL = NULL, 1 = NULL;
-> 1, NULL, NULL - 3Assign a value:=
- 4Check whether a value is within a range of valuesBETWEEN ... AND ...
- 5Cast a string to a binary stringBINARY
- 6Bitwise AND&
- 7Bitwise inversion~
- 8Bitwise OR|
- 9Bitwise XOR^
- 10Case operatorCASE
- 11Integer divisionDIV
- 12Division operator/
- 13Equal operator=
- 14NULL-safe equal to operator<=>
mysql> SELECT 1 <=> 1, NULL <=> NULL, 1 <=> NULL;
-> 1, 1, 0 - 15Greater than operator>
- 16Greater than or equal operator>=
- 17Test a value against a booleanIS
mysql> SELECT 1 IS TRUE, 0 IS FALSE, NULL IS UNKNOWN;
-> 1, 1, 1 - 18Test a value against a booleanIS NOT
- 19NOT NULL value testIS NOT NULL
- 20NULL value testIS NULL
- 21Return value from JSON column after evaluating path->
- 22Left shift<<
- 23Less than operator<
- 24Less than or equal operator<=
- 25Simple pattern matchingLIKE
- 26Minus operator-
- 27Modulo operator%, MOD
- 28Negates valueNOT, !
- 29Check whether a value is not within a range of valuesNOT BETWEEN ... AND ...
- 30Not equal operator!=, <>
- 31Negation of simple pattern matchingNOT LIKE
- 32Negation of REGEXPNOT REGEXP
- 33Logical OR||, OR
- 34Addition operator+
- 35Pattern matching using regular expressionsREGEXP
- 36Right shift>>
- 37Synonym for REGEXPRLIKE
- 38Compare soundsSOUNDS LIKE
- 39Multiplication operator*
- 40Change the sign of the argument-
- 41Logical XORXOR
- 42Return the first non-NULL argument or NULL if not foundCOALESCE(value,...)
mysql> SELECT COALESCE(NULL,1);
-> 1 - 43With two or more arguments, returns the largest (maximum-valued) argument.GREATEST(value1,value2,...)
mysql> SELECT GREATEST('B','A','C');
-> 'C' - 44Operator to check whether a value is within a set of valuesexpr IN (value,...)
- 45Return the index of the argument that is less than the first argumentINTERVAL(N,N1,N2,N3,...)
mysql> SELECT INTERVAL(10, 1, 10, 100, 1000);
-> 2
Returns 0 if N < N1, 1 if N < N2, etc, -1 if N is NULL - 46Return the smallest argumentLEAST(value1,value2,...)
- 47Case operatorCASE
SELECT CASE WHEN 1>0 THEN 'true' ELSE 'false' END; - 48If/else constructIF(expr1,expr2,expr3)
mysql> SELECT IF(1>2,2,3);
-> 3 - 49Null if/else constructIFNULL(expr1,expr2)
- 50Return NULL if expr1 = expr2NULLIF(expr1,expr2)
- 51—
Information
- Description
- Concurso Público Bancos de Dados Flashcards on Untitled, created by dgmagno on 17/02/2016.
- Created by
- dgmagno
- Views
- 0
- Rating