-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Data types
Basic syntax
- comment syntax differences
- identifier syntax
- unicode letters:
ähhää - dollar sign as non-first character
foo$bar - dollar sign as first character
$foo(though it generates a warning) - can begin with a number
- unicode letters:
- String literals
-
_charsetprefixes - Natural charset strings
- All backslash escape codes
-
- Interval literals
- Number literals
- Date/Time literals
- Hex literals:
x'01af'syntax - Hex literals:
0x01AFsyntax - Bit literals:
b'01'syntax - Bit literals:
0b01syntax - Variables (using
@namesyntax) - ODBC syntax for date/time literals (e.g.
{ d 'str' }) - Executable comments (like
/*! STRAIGHT_JOIN */)
Expressions
- Operators:
- Concatenation of strings with space
-
'foo' 'bar -
'foo' "bar" -
N'foo' 'bar' -
_utf8 'foo' 'bar'
-
-
&&,||as equivalent toAND,OR -
IS [NOT] {TRUE | FALSE} -
IS [NOT] UNKNOWN -
>=ANY | SOME | ALL -
<=> -
! -
SOUNDS LIKE -
COLLATE -
BINARY - MEMBER OF
- JSON operators
-
:=assignment operator - Full text search
- Precedence rules
- Concatenation of strings with space
-
ROW ( ... )expressions - Function calls:
- Built-in function name parsing
- parenthesis-less function calls:
CURRENT_DATE,CURRENT_TIMESTAMP,CURRENT_TIME,CURRENT_USER,LOCALTIME,LOCALTIMESTAMP. -
EXTRACT(... FROM ...)
Parameters
-
?syntax.
Query syntax
- Hints:
HIGH_PRIORITY,STRAIGHT_JOIN,SQL_SMALL_RESULT... - Use of hints both before and after DISTINCT, like:
SELECT STRAIGHT_JOIN DISTINCT HIGH_PRIORITY -
DISTINCTROW -
INTO {OUTFILE | DUMPFILE | var} -
GROUP BY ... WITH ROLLUP -
ORDER BY ... WITH ROLLUP -
FOR {UPDATE | SHARE}clause -
LOCK IN SHARE MODE - FROM clause:
-
PARTITIONselection -
FROM DUAL -
LATERAL -
STRAIGHT_JOIN - List of tables inside parens
tbl LEFT JOIN (tbl1, tbl2, tbl3) ON tbl.id=tbl1.id AND tbl1.id=tbl2.id - Table alias with column list
- index hint list:
-
{USE | IGNORE | FORCE} {INDEX | KEY} -
[ FOR {JOIN | ORDER BY | GROUP BY} ] -
([index_name, ...])
-
- ODBC
{ OJ ... }syntax
-
- TABLE statements (shorthand for simple SELECT)
- VALUES statements
Metadata
Metadata
Assignees
Labels
No labels