"Sandrine C." wrote:
>
> Hello !
>
> Just wanted to know hot to do when you want to load a table : What is the
> 'look' of the filr
>
> For example : if i have a simple table like
> Name VARCHAR Birth DATE
>
> How should be the file to load??
>
> Thanks
Hi Sandrine
The file to load via LOAD DATA INFILE or mysqlimport should look like this:
"John" 1974-03-33
"Mary Ann" 1981-04-25
...
a) The columns of one row are by default seperated by an <tab> character.
b) Each row ends with a <newline> character.
c) Strings are enclosed in doublequotes ".
d) If you want either of backslash \, quote ', double quote " in your strings, you have to
escape them by a backslash.
In order to get the string:
abc\def'cgk"poq
you have to write:
abc\\def\'cgk\"poq
e) If you want <newline> and/or <tab> characters inside your strings, you have
to use:
\n for <newline>
\t for <tab>
If you want another format, you can specify other field and line seperation strings.
Tschau
Christian