Multi-Line Command Entry


The MySQL command line interface lets you place a statement on one line or increase it across multiple lines. There's no disparity in syntax amid the two. Using multiple lines permits you to break down the SQL statement into steps you may more effortlessly comprehend.

In multiple line mode, the interpreter attaches each line to the prior lines. This continues until you enter a semicolon ";" to close out the SQL statement. Once the semicolon is typed in and you hit enter, the statement is executed.
Here's an example of the same exact SQL statement entered both ways:

Single Line Entry
mysql> create table table33 (field01 integer,field02 char(30));

Multiple Line Entry
mysql> create table table33
-> (field01
-> integer,
-> field02
-> char(30));


Copyright © 1999-2003. Maxis Media Studios, LLC All Rights Reserved.
Montreal Web Design - Maxis Media