MySQL Extensions to Standard SQL
21
by renaming the
.MYD
,
.MYI
, and
.frm
files to which the table corresponds. (Nevertheless, it is
preferable to use
RENAME TABLE
or
ALTER TABLE ... RENAME
and let the server rename the
files.)
Database and table names cannot contain path name separator characters (“
/
”, “
\
”).
• General language syntax
• By default, strings can be enclosed by either “
"
” or “
'
”, not just by “
'
”. (If the
ANSI_QUOTES
[535]
SQL mode is enabled, strings can be enclosed only by “
'
” and the server
interprets strings enclosed by “
"
” as identifiers.)
• “
\
” is the escape character in strings.
• In SQL statements, you can access tables from different databases with the
db_name.tbl_name
syntax. Some SQL servers provide the same functionality but call this
User space
. MySQL
Server doesn't support tablespaces such as used in statements like this:
CREATE TABLE
ralph.my_table ... IN my_tablespace
.
• SQL statement syntax
• The
ANALYZE TABLE
,
CHECK TABLE
,
OPTIMIZE TABLE
, and
REPAIR TABLE
statements.
• The
CREATE DATABASE
,
DROP DATABASE
, and
ALTER DATABASE
statements. See
Section 13.1.6, “
CREATE DATABASE
Syntax”
,
Section 13.1.13, “
DROP DATABASE
Syntax”
, and
Section 13.1.1, “
ALTER DATABASE
Syntax”
.
• The
DO
statement.
•
EXPLAIN SELECT
to obtain a description of how tables are processed by the query optimizer.
• The
FLUSH
and
RESET
statements.
• The
SET
statement. See
Section 13.7.4, “
SET
Syntax”
.
• The
SHOW
statement. See
Section 13.7.5, “
SHOW
Syntax”
. The information produced by many of
the MySQL-specific
SHOW
statements can be obtained in more standard fashion by using
SELECT
to query
INFORMATION_SCHEMA
. See
Chapter 19,
INFORMATION_SCHEMA
Tables
.
• Use of
LOAD DATA INFILE
. In many cases, this syntax is compatible with Oracle's
LOAD DATA
INFILE
. See
Section 13.2.6, “
LOAD DATA INFILE
Syntax”
.
• Use of
RENAME TABLE
. See
Section 13.1.20, “
RENAME TABLE
Syntax”
.
• Use of
REPLACE
instead of
DELETE
plus
INSERT
. See
Section 13.2.7, “
REPLACE
Syntax”
.
• Use of
CHANGE col_name
,
DROP col_name
, or
DROP INDEX
,
IGNORE
or
RENAME
in
ALTER
TABLE
statements. Use of multiple
ADD
,
ALTER
,
DROP
, or
CHANGE
clauses in an
ALTER TABLE
statement. See
Section 13.1.4, “
ALTER TABLE
Syntax”
.
• Use of index names, indexes on a prefix of a column, and use of
INDEX
or
KEY
in
CREATE TABLE
statements. See
Section 13.1.10, “
CREATE TABLE
Syntax”
.
• Use of
TEMPORARY
or
IF NOT EXISTS
with
CREATE TABLE
.
• Use of
IF EXISTS
with
DROP TABLE
and
DROP DATABASE
.
• The capability of dropping multiple tables with a single
DROP TABLE
statement.
• The
ORDER BY
and
LIMIT
clauses of the
UPDATE
and
DELETE
statements.
•
INSERT INTO tbl_name SET col_name = ...
syntax.
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...