Extract a mysql query to XML

echo "select * from table" | mysql -B --xml -h [host] -u [user] -p[password] [database] > output.xml

not all of the parameters are needed of course.

use --table if you want the nice ascii tables around the result
if -B is given and neigther --xml nor --table are given, the output is tabbed out.
Dette indlæg blev udgivet i Knowledge Base, Old Base, SQL. Bogmærk permalinket.

Skriv et svar