Reputation: 131
I am trying to import a csv file that contains 5 columns and 100 rows. When I open the terminal and type SELECT * FROM cmc2 it only shows 1 row.
mysql> SELECT * FROM cmc2;
+--------------------------------+-------+------------+--------------------+--------+
| alt_name | price | market_cap | circulating_supply | volume |
+--------------------------------+-------+------------+--------------------+--------+
| Alt coin name;Price;Market cap | 554 | 714 | 630 | NULL |
+--------------------------------+-------+------------+--------------------+--------+
1 row in set (0.01 sec)
this is my table that i created:
mysql> create table cmc2 (alt_name varchar(30), price int(20), market_cap int(20), circulating_supply int(20), volume int(20));
Upvotes: 2
Views: 562
Reputation: 4961
As per the documentation "CSV files must have one line for each row of data and have comma-separated fields." So you should replace the semicolons in your file with commas.
This should be an easy task if you have a tool like Word, Excel, etc... Where you can do a search (Control + F) and select replace with... then import the CSV file with the required separator
Upvotes: 3