Previous Section  < Day Day Up >  Next Section

Conventions Used in This Book

This section explains the conventions used in this study guide.

Text in this style is used for program and shell script names, SQL keywords, and command output.

Text in this style represents input that you would type while entering a command or statement.

Text in this style represents variable input for which you're expected to enter a value of your own choosing. Some examples show commands or statements that aren't meant to be entered exactly as shown. Thus, in an example such as the following, you would substitute the name of some particular table for table_name:

SELECT * FROM table_name;

In syntax descriptions, square brackets indicate optional information. For example, the following syntax for the SHOW TABLES statement indicates that you can invoke the statement with or without a FROM clause that specifies a database name:


In most cases, SQL statements are shown with a trailing semicolon character (;). The semicolon indicates where the statement ends and is useful particularly in reading multiple-statement examples. However, the semicolon is not part of the statement itself.

If a statement is shown together with the output that it produces, it's shown preceded by a mysql> prompt. An example shown in this manner is meant to illustrate the output you would see were you to issue the statement using the mysql client program. For example, a section that discusses the use of the VERSION() function might contain an example like this:



| VERSION()        |


| 4.0.16-gamma-log |


Some commands are intended to be invoked from the command line, such as from a Unix shell prompt or from a Windows console window prompt. In this guide, these commands are shown preceded by a shell> prompt. Some Windows-specific examples use a prompt that begins with C:. The prompt you will actually see on your own system depends on your command interpreter and the prompt settings you use. (The prompt is likely to be % or $ for a Unix shell and C:\> for a Windows console.)

SQL keywords such as SELECT or ORDER BY aren't case sensitive in MySQL and may be specified in any lettercase when you issue queries. However, for this guide, keywords are written in uppercase letters to help make it clear when they're being used as keywords and not in a merely descriptive sense. For example, "UPDATE statement" refers to a particular kind of SQL statement (one that begins with the keyword UPDATE), whereas "update statement" is a descriptive term that refers more generally to any kind of statement that updates or modifies data. The latter term includes UPDATE statements, but also other statements such as INSERT, REPLACE, and DELETE.

Example commands generally omit options for specifying connection parameters, such as --host or --user to specify the server host or your MySQL username. It's assumed that you'll supply such options as necessary. The "Core Study Guide" discusses connection parameter options.

    Previous Section  < Day Day Up >  Next Section