terry
terry

Reputation: 143

Showing irrelevant data from other tables in MYSQL workbench

I am trying to import a table that has three columns. After my import when I do Select * from tablename
I see all irrelevant data from other tables or databases.
Even though I am accessing the table through dbname.tablename format.
Have anyone experienced this situation?

Upvotes: 0

Views: 82

Answers (1)

Priyesh Jain
Priyesh Jain

Reputation: 41

Make sure that the column names of the table in the database and the one in CSV File heading is exactly same. MySQL workbench table data import wizard does not allow you to ignore initial rows. If still having issues, I would suggest executing following query which runs must faster than the table data import wizard:

load data local infile 'filelocation/filename.csv' into table tablename
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\r\n'
IGNORE 1 LINES
(col1, col2, col3);

Upvotes: 1

Related Questions