Copying tables in MySQL

There are multiple ways this can be done. I will mention two here.

Method 1

In MySQL, run these statements:

Method 2

On the command line, run these commands:

Get just the fields names of a table in MySQL

If you do:

Mysql will give you table information which will contain field names, their types, etc. What if you want just the field names and nothing else? You can run this query and do just that:

Importing a CSV file into a table in MySQL

Here’s how you would import data into MySQL using a query

Cool things you can do with MySQL

Run a query from command line

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