

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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 Questions & Answers
- 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 to change MySQL timezone?
- 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?
- Can we use ADD and CHANGE with ALTER Statement in MySQL?
- How to change MySQL column definition?
- MySQL query to select column values ending with certain character/number?
- How to use NULL in MySQL SELECT statement?
- How to change max_allowed_packet size in MySQL?
- How to change Table Engine in MySQL?
- How to change MySQL error message language?
- IF ELSE statement in a MySQL Statement?
Advertisements