I have a tab separated text file like
a b c
1 a d
2 g l
3 m r
I want to load this file in mysql without creating the table first. Is there any possibility?
for load data infile, I have to create the table first.
You can't tell to mysql to create automatically your table based on a text file (LOAD DATA INFILE).
The problem is that MySQL can't guess the data type for a column in a file.
I think that to avoid your problem you can use mysqldump to import the table without creating it but what mysql do (as you can see in dump) is CREATE TABLE IF NOT EXIST.