Skip to content

Instantly share code, notes, and snippets.

@anuvrat
Created March 5, 2012 09:22
Show Gist options
  • Select an option

  • Save anuvrat/1977611 to your computer and use it in GitHub Desktop.

Select an option

Save anuvrat/1977611 to your computer and use it in GitHub Desktop.
create table names_table (
first_name varchar(20),
last_name varchar(20),
birth_date date);
load data infile '/tmp/anu/20120219'
into table names_table
fields terminated by '\t'
lines terminated by '\n'
(first_name, last_name, @var1)
set birth_date = str_to_date(@var1, '%d-%b-%y');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment