
- 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 change MySQL ending statement?
To change the MySQL ending statement, you can use DELIMITER −
DELIMITER anySymbol
Above, anySymbol is the symbol you can set. The default is DELIMITER ;
Let us first create a table −
mysql> DELIMITER // mysql> create table DemoTable -> ( -> Id int, -> Name varchar(20) -> )// Query OK, 0 rows affected (0.52 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values(100,'Chris')// Query OK, 1 row affected (0.21 sec) mysql> insert into DemoTable values(101,'David')// Query OK, 1 row affected (0.16 sec) mysql> insert into DemoTable values(102,'Bob')// Query OK, 1 row affected (1.07 sec)
Display all records from the table using select statement −
mysql> select * from DemoTable //
This will produce the following output −
+------+-------+ | Id | Name | +------+-------+ | 100 | Chris | | 101 | David | | 102 | Bob | +------+-------+ 3 rows in set (0.00 sec)
- Related Articles
- Change value from 1 to Y in MySQL Select Statement?
- How can we change MySQL user password by using UPDATE statement?
- Change value from 1 to Y in MySQL Select Statement using CASE?
- How can we change MySQL user password by using the SET PASSWORD statement?
- How can we change MySQL user password by using the ALTER USER statement?
- How to change the starting and ending points of axes labels using plot function in R?
- How to change MySQL timezone?
- MySQL query to select column values ending with certain character/number?
- Can we use ADD and CHANGE with ALTER Statement in MySQL?
- How to change MySQL column definition?
- How to use NULL in MySQL SELECT statement?
- How to change Table Engine in MySQL?
- How to change max_allowed_packet size in MySQL?
- How to change MySQL error message language?
- How to implement WHILE LOOP with IF STATEMENT MySQL?

Advertisements