Collections:
Returning Query Output in XML Format in MySQL
How To Return Query Output in XML Format in MySQL?
✍: FYIcenter.com
By default, "mysql" returns query output in text table format. If you want to receive query output in XML format, you need to use the "-X" command option. Here is a good tutorial exercise:
>cd \mysql\bin
>mysql -u root -X test
mysql> SELECT * FROM links;
<?xml version="1.0"?>
<resultset statement="SELECT * FROM links">
<row>
<field name="id">1</field>
<field name="name">dba.fyicenter.com</field>
</row>
<row>
<field name="id">10</field>
<field name="name">dba.fyicenter.com</field>
</row>
</resultset>
2 rows in set (0.00 sec)
⇒ Introduction to SQL Basics in MySQL
⇐ Returning Query Output in HTML Format in MySQL
2018-04-21, 3727🔥, 0💬
Popular Posts:
What Is the Difference Between GETDATE() and GETUTCDATE() in SQL Server Transact-SQL? The difference...
How To Insert New Line Characters into Strings in SQL Server Transact-SQL? If you want to break a st...
How to obtain the version number of the ICU (International Components for Unicode) library using the...
What Happens to an Arithmetic Operation with Two Different Data Types in SQL Server Transact-SQL? Wh...
How To Concatenate Two Character Strings Together in SQL Server Transact-SQL? Concatenating two char...