Database, table, and column names must often be substituted into statements. To indicate that such substitution is necessary, this manual uses db_name, tbl_name, and col_name. For example, you might see a statement like this:
数据库、表和列名字经常必须被代入命令中。为表明这种代入是必要的,本手册使用db_name、tbl_name和col_name。例如,你可能看到象这样的语句:
mysql> SELECT col_name FROM db_name.tbl_name;
This means that if you were to enter a similar statement, you would supply your own database, table, and column names, perhaps like this:
这意味着如果你想输入类似的语句,你将提供你自己数据库、表和列的名字,也许像这样:
mysql> SELECT author_name FROM biblio_db.author_list;
SQL keywords are not case sensitive and may be written in any lettercase. This manual uses uppercase. In syntax descriptions, square brackets (‘[’ and ‘]’) indicate optional words or clauses. For example, in the following statement, IF EXISTS is optional:
如果不有意地特别强调,所有的SQL的关键字一律写成大写。
在句法描述中,方括号('['和']')被用来表示任选的词或子句:
如:在以下陈述中,IF EXISTS是可选择的:
DROP TABLE [IF EXISTS] tbl_name
When a syntax element consists of a number of alternatives, the alternatives are separated by vertical bars (‘|’). When one member from a set of choices may be chosen, the alternatives are listed within square brackets (‘[’ and ‘]’):
当一个语法元素由很多选择组成时,各选择用垂直线分开('|')。当可能从一组选择中选择一个成员时,选择在方括号内被列出。当必须从一组选择中选择一个成员时,选择在花括号内被列出('{'和'}'):
TRIM([[BOTH | LEADING | TRAILING] [remstr] FROM] str)
When one member from a set of choices must be chosen, the alternatives are listed within braces (‘{’ and ‘}’):
当从选择一组选择中选择一个成分时,另一个选择用 (‘{’ and ‘}’)标注出。
{DESCRIBE | DESC} tbl_name [col_name | wild]
An ellipsis (…) indicates the omission of a section of a statement, typically to provide a shorter version of more complex syntax. For example, INSERT … SELECT is shorthand for the form of INSERT statement that is followed by a SELECT statement.
一个省略号表示语句部分的冗长,正常下应该给出较简短的复杂语法命令。例如:INSERT … SELECT是INSERT语句的速记,之后便是SELECT陈述。
An ellipsis can also indicate that the preceding syntax element of a statement may be repeated. In the following example, multiple reset_option values may be given, with each of those after the first preceded by commas:
省略号也表示语句语法元素执行的重复。在以下例子中,给出多样的reset_option值,
RESET reset_option [,reset_option] ...
Commands for setting shell variables are shown using Bourne shell syntax. For example, the sequence to set the CC environment variable and run the configure command looks like this in Bourne shell syntax:
shell命令用 Bourne shell语法显示。例如,设置一个环境变量和运行一个命令的序列在 Bourne shell语法看起来像这样:
shell> CC=gcc ./configure
If you are using csh or tcsh, you must issue commands somewhat differently:
如果你正在使用csh或tcsh风格的外壳,你可能需要用略微不同的方式发出命令。
shell> setenv CC gcc
shell> ./configure
本手册由MySQL.CN开启中文化,中文化版权由MySQL.CN拥有。
~如需转载,请标明出处,并保留版权信息~
相关文章