Php developers,Php Tutorials ,Web development, Web Developers, Php hosting, open-source,community
 
Serving the LAMP developers all over the word
LampDevelopers is a pure LAMP Developers community
Php developers,Php Tutorials ,Web development, Web Developers, Php hosting, open-source,community
LAMP Developers
   
   
   
   
   
   
Web Development
   
Developer / Programmer
   
Related Links
   
Member
   
Enter Keyword
Multi-line Command Entry

The MySQL command line interface allows you to put a statement on one line or spread it across multiple lines. There's no difference in syntax between the two. Using multiple lines allows you to break down the SQL statement into steps you may more easily comprehend.

In multiple line mode, the interpreter appends 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 4.1.16-nt-max> create table

table33 (field01 integer,field02 char(30));

Multiple Line Entry

mysql 4.1.16-nt-max> create table

table33
-> (field01
-> integer,
-> field02
-> char(30));

Don't break up words:

Valid

Invalid

mysql 4.1.16-nt-max> create table table33
-> (field01
-> integer,
-> field02
-> char(30));

mysql 4.1.16-nt-max> create table table33
-> (field01 inte
-> ger,
-> field02
-> char(30));

When inserting or updating records, do not spread a field's string across multiple lines, otherwise the line breaks are stored in the record:

Standard Operation

mysql

4.1.16-nt-max> insert into table33 (field02)
-> values
-> ('Who

thought of foo?');

Line Break Stored in Record

mysql

4.1.16-nt-max> insert into table33 (field02)
-> values
-> ('Pooh

thought
-> of foo.');

Results

mysql 4.1.16-nt-max> select * from

table33;

Field01 | field02

NULL

NULL

of foo. |

Who thought of foo?

Pooh thought

 

News
this is the news
this is the news this is the news this is the news....
openWYSIWYG 1.01 bet....
small description
Links