
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
How to update the current delimiter in MySQL?
At first, let us determine the current delimiter in MySQL using the following syntax
\s
The above syntax will let you know about the current delimiter. Let us implement the above syntax.
The query is as follows
mysql> \s
The following is the output
C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe Ver 8.0.12 for Win64 on x86_64 (MySQL Community Server - GPL) Connection id: 19 Current database: sample Current user: root@localhost SSL: Cipher in use is DHE-RSA-AES128-GCM-SHA256 Using delimiter: ; Server version: 8.0.12 MySQL Community Server - GPL Protocol version: 10 Connection: localhost via TCP/IP Insert id: 11 Server characterset: utf8 Db characterset: utf8 Client characterset: utf8 Conn. characterset: utf8 TCP port: 3306 Uptime: 9 hours 50 min 52 sec Threads: 3 Questions: 135 Slow queries: 0 Opens: 272 Flush tables: 2 Open tables: 247 Queries per second avg: 0.003
If you change the delimiter then it will show the updated current delimiter.
Let us change the current delimiter with //. The syntax is as follows
DELIMITER //
The query is as follows to change the delimiter
mysql> DELIMITER //
Let us now check the current i.e. the updated delimiter.
The query is as follows
mysql> \s
The following is the output
C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe Ver 8.0.12 for Win64 on x86_64 (MySQL Community Server - GPL) Connection id: 19 Current database: sample Current user: root@localhost SSL: Cipher in use is DHE-RSA-AES128-GCM-SHA256 Using delimiter: // Server version: 8.0.12 MySQL Community Server - GPL Protocol version: 10 Connection: localhost via TCP/IP Insert id: 11 Server characterset: utf8 Db characterset: utf8 Client characterset: utf8 Conn. characterset: utf8 TCP port: 3306 Uptime: 9 hours 54 min 10 sec Threads: 3 Questions: 138 Slow queries: 0 Opens: 272 Flush tables: 2 Open tables: 247 Queries per second avg: 0.003
- Related Articles
- How to determine the current delimiter in MySQL?
- How to correctly use DELIMITER in a MySQL stored procedure?
- Update record on a specific date matching the current date in MySQL
- When the MySQL delimiter error occur?
- How to update the date format in MySQL?
- How to perform Increment in MySQL Update?
- How to correctly use delimiter in a MySQL stored procedure and insert values?
- MySQL query to return a substring after delimiter?
- How to update a Timestamp and set to current date in MongoDB?
- How to batch update MySQL table?
- How to update empty string to NULL in MySQL?
- Create a stored procedure with delimiter in MySQL
- How to update a value with substring of current value by removing the separator and numbers after a separator in MySQL?
- What does DELIMITER // do in a Trigger in MySQL?
- How to remove hyphens using MySQL UPDATE?

Advertisements