Categories
MySQL

Cool things you can do with MySQL

Run a query from command line

# Use the -e flag
shell>mysql -e "select * from table"

Tell MySQL to output the results of a query in HTML or XML

# On command line you would write the following to 
# tell MySQL to output the results in HTML format
shell>mysql -e "select * from table" --html

# This is for XML
shell> mysql -e "select * from table" --xml

# This is for batched results
shell> mysql -e "select * from table" --batch

By Moazzam

Moazzam is a software developer working in the big apple. He has over a decade of experience in development. While most of his work involves developing web applications, he does development for Android and Windows Mobile in his spare time.

Leave a Reply

Your email address will not be published. Required fields are marked *