MySQL Extensions to Standard SQL
22
• The
DELAYED
clause of the
INSERT
and
REPLACE
statements.
• The
LOW_PRIORITY
clause of the
INSERT
,
REPLACE
,
DELETE
, and
UPDATE
statements.
• Use of
INTO OUTFILE
or
INTO DUMPFILE
in
SELECT
statements. See
Section 13.2.8, “
SELECT
Syntax”
.
• Options such as
STRAIGHT_JOIN
or
SQL_SMALL_RESULT
in
SELECT
statements.
• You don't need to name all selected columns in the
GROUP BY
clause. This gives better
performance for some very specific, but quite normal queries. See
Section 12.15, “Functions and
Modifiers for Use with
GROUP BY
Clauses”
.
• You can specify
ASC
and
DESC
with
GROUP BY
, not just with
ORDER BY
.
• The ability to set variables in a statement with the
:=
assignment operator. See
Section 9.4, “User-
Defined Variables”
.
• Data types
• The
MEDIUMINT
,
SET
, and
ENUM
data types, and the various
BLOB
and
TEXT
data types.
• The
AUTO_INCREMENT
,
BINARY
,
NULL
,
UNSIGNED
, and
ZEROFILL
data type attributes.
• Functions and operators
• To make it easier for users who migrate from other SQL environments, MySQL Server supports
aliases for many functions. For example, all string functions support both standard SQL syntax and
ODBC syntax.
• MySQL Server understands the
||
[881]
and
&&
[880]
operators to mean logical OR and AND,
as in the C programming language. In MySQL Server,
||
[881]
and
OR
[881]
are synonyms,
as are
&&
[880]
and
AND
[880]
. Because of this nice syntax, MySQL Server doesn't support
the standard SQL
||
[881]
operator for string concatenation; use
CONCAT()
[887]
instead.
Because
CONCAT()
[887]
takes any number of arguments, it is easy to convert use of the
||
[881]
operator to MySQL Server.
• Use of
COUNT(DISTINCT value_list)
[970]
where
value_list
has more than one
element.
• String comparisons are case-insensitive by default, with sort ordering determined by the collation
of the current character set, which is
latin1
(cp1252 West European) by default. If you don't like
this, you should declare your columns with the
BINARY
attribute or use the
BINARY
cast, which
causes comparisons to be done using the underlying character code values rather than a lexical
ordering.
• The
%
[911]
operator is a synonym for
MOD()
[911]
. That is,
N % M
is equivalent to
MOD(N,M)
[911]
.
%
[911]
is supported for C programmers and for compatibility with
PostgreSQL.
• The
=
[875]
,
<>
[876]
,
<=
[876]
,
<
[876]
,
>=
[876]
,
>
[876]
,
<<
[951]
,
>>
[951]
,
<=>
[876]
,
AND
[880]
,
OR
[881]
, or
LIKE
[896]
operators may be used in expressions in the
output column list (to the left of the
FROM
) in
SELECT
statements. For example:
mysql>
SELECT col1=1 AND col2=2 FROM my_table;
• The
LAST_INSERT_ID()
[961]
function returns the most recent
AUTO_INCREMENT
value. See
Section 12.13, “Information Functions”
.
•
LIKE
[896]
is permitted on numeric values.
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...