How To Load Data Files into Tables with "mysqlimport"?
Submitted by: AdministratorIf 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 mysqlin
>type emplinks.tab
www.GlobalGuideLine.com
www.mysql.com
>mysqlimport -u root test emplinks.tab
test.links: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0
>mysql -u root -e "SELECT * FROM links" test
<pre>+-------------------------+
| name |
+-------------------------+
| www.GlobalGuideLine.com |
| www.GlobalGuideLine.com |
| www.mysql.com |
+-------------------------+</pre>
Submitted by: Administrator
>cd mysqlin
>type emplinks.tab
www.GlobalGuideLine.com
www.mysql.com
>mysqlimport -u root test emplinks.tab
test.links: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0
>mysql -u root -e "SELECT * FROM links" test
<pre>+-------------------------+
| name |
+-------------------------+
| www.GlobalGuideLine.com |
| www.GlobalGuideLine.com |
| www.mysql.com |
+-------------------------+</pre>
Submitted by: Administrator
Read Online MySQL Programming Job Interview Questions And Answers
Top MySQL Programming Questions
☺ | How To Use CASE Expression? |
☺ | What Is TIMESTAMP in MySQL? |
☺ | How To Use Regular Expression in Pattern Match Conditions? |
☺ | What Is MySQL? |
☺ | How To Decrement Dates by 1 in MySQL? |
Top Databases Programming Categories
☺ | RDBMS Interview Questions. |
☺ | SQL Interview Questions. |
☺ | SSRS Interview Questions. |
☺ | Sybase Interview Questions. |
☺ | Database Administrator (DBA) Interview Questions. |