Mastering MySQL 4 [Electronic resources]

Ian Gilfillan

نسخه متنی -صفحه : 229/ 119
نمايش فراداده

Appendix A: MySQL Syntax Reference

Overview

This appendix contains the SQL statements and syntax used by MySQL version 4.0. For newer versions, you +1

should see the documentation that comes with your distribution, or visit the MySQL site (www.mysql.com).

The convention used throughout the appendixes is as follows:

Square brackets ([]) denote something optional. For example:

SELECT expression [FROM table_name [WHERE where_clause]]

indicates that the expression is compulsory (for example SELECT 42/10) and that the WHERE clause is optional but can only exist if the optional FROM table_name clause exists. (You can have SELECT * FROM t1, but not SELECT * WHERE f1>10, because the table_name clause is then missing.)

A vertical bar (|) separates alternatives. For example:

CREATE [UNIQUE | FULLTEXT] INDEX

indicates that UNIQUE and FULLTEXT are separate options.

Curly brackets ({}) indicate that one of the options must be chosen. For example:

CREATE TABLE ... [TYPE = {BDB | HEAP | ISAM | InnoDB | MERGE |
MRG_MYISAM | MYISAM }]

If the optional TYPE clause is specified, one of BDB, HEAP, ISAM, InnoDB, MERGE, MRG_ MYISAM or MYISAM must be specified.

Three dots (...) indicate that the option can be repeated. For example:

SELECT expression,...

indicates that the expression can be repeated (separated by a comma), as follows: SELECT f1,f2,f3.