How To Load Data Files into Tables with \\\"mysqlimport\\\"?

Answer

If you want to load a data file directly into a table, you need to prepare the data file as one line per data row, and use tab character as the column delimiter. The data file name should match the target table name. The following is a good tutorial exercise on using \"mysqlimport\":

>cd mysqlbin
>type templinks.tab
www.test.com
www.mysql.com

>mysqlimport -u root test templinks.tab test.links: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0


>mysql -u root -e \"SELECT * FROM links\" test
+-------------------------+

| name |

+-------------------------+

| www.test.com |
| www.mysql.com |

+-------------------------+

All sql dba Questions

Ask your interview questions on sql-dba

Write Your comment or Questions if you want the answers on sql-dba from sql-dba Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---