Anonymous Asked in Cars &Transportation · 2 weeks ago

What is the use of semicolon (;) after every command in MySQL?

3.2 Entering Queries · A query normally consists of an SQL statement followed by a semicolon. · When you issue a query, mysql sends it to the server for execution .


What is the purpose of semicolon in MySQL queries?

By default, mysql itself recognizes the semicolon as a statement delimiter, so you must redefine the delimiter temporarily to cause mysql to pass the entire stored program definition to the server. To redefine the mysql delimiter, use the delimiter command.

Is semicolon needed in MySQL?

If you're writing single statements in, say, PHP and then sending them to MySQL for processing, the semicolon is optional. You ask if it "might have possible negative effects maybe during server high load, caching etc." The answer to that is 'No'.

Is it mandatory to enclose every SQL query with semicolon at the end?

Problem. The semicolon (;) is used in SQL code as a statement terminator. For most SQL Server T-SQL statements it is not mandatory.

How do you end a MySQL session?

You can also terminate the session by issuing an EXIT statement or (under Unix) by typing Ctrl-D. The way you specify connection parameters for mysql also applies to other MySQL programs such as mysqldump and mysqladmin.

Related Questions

Relevance
Write us your question, the answer will be received in 24 hours