Home > Database > Mysql Tutorial > How does MySQL evaluate statements written on different lines?

How does MySQL evaluate statements written on different lines?

WBOY
Release: 2023-09-08 23:41:02
forward
1381 people have browsed it

How does MySQL evaluate statements written on different lines?

#In fact, MySQL determines the end of the statement when it gets the terminating semicolon. Suppose we write a statement in a different line, then immediately after writing the first line, MySQL changes from "mysql>" to "->", which indicates that MySQL has not seen the complete statement and is waiting for the rest of the statement . When it gets a semicolon, MySQL executes the statement. It can be understood through the following example -

Example

mysql> Select Id, Name
    -> From
    -> Student_info
    -> ;

+------+---------+
| Id   | Name    |
+------+---------+
| 101  | YashPal |
| 105  | Gaurav  |
| 125  | Raman   |
| 130  | Ram     |
| 132  | Shyam   |
| 133  | Mohan   |
| 150  | Saurabh |
+------+---------+
7 rows in set (0.07 sec)
Copy after login

The above is the detailed content of How does MySQL evaluate statements written on different lines?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template