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

Posted

in

by

Tags:

Comments

Leave a Reply

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