![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- 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 echo print statements while executing an SQL script?
To perform echo print statements while executing SQL scripts, use the following syntax.
The syntax is as follows −
SELECT ‘anyStringValue as’ ‘;
The query is as follows −
mysql> select 'This is a SQL Script' AS' ';
The following is the output −
+----------------------+ | | +----------------------+ | This is a SQL Script | +----------------------+ 1 row in set, 1 warning (0.00 sec)
You can add dynamic data to your status like insert, update and delete with the help of concat() function. The query is as follows −
mysql> select concat ("Inserted ", row_count(), " rows successfully") AS '';
The following is the output −
+-------------------------------+ | | +-------------------------------+ | Inserted -1 rows successfully | +-------------------------------+ 1 row in set (0.00 sec)
Advertisements