# Syntax of LOAD DATA OUTFILE and SELECT .....INTO INFILE

**URL:** <https://forums.percona.com/t/syntax-of-load-data-outfile-and-select-into-infile/1470>\
**Category:** Other MySQL® Questions\
**Created:** [August 5, 2010, 10:47pm UTC](https://forums.percona.com/t/syntax-of-load-data-outfile-and-select-into-infile/1470 "2010-08-05T22:47:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kamal4perc](https://avatars.discourse-cdn.com/v4/letter/k/f14d63/32.png) [@kamal4perc](https://forums.percona.com/u/kamal4perc)\
**Post date:** [August 5, 2010, 10:47pm UTC](https://forums.percona.com/t/syntax-of-load-data-outfile-and-select-into-infile/1470/1 "2010-08-05T22:47:29Z")

</div>

please help…

I want the format of performing LOAD DATA OUTFILE to select a table data into a .txt/.xls file.

Also I heard about SELECT…INTO INFILE loading a .txt file into a table.

They are quite opposed to the format of LOAD DATA INFILE and SELECT …INTO OUTFILE.

Kindly do the favour…

Thanks to one & all

---

<div class="post-metadata">

**Author:** ![posner](https://avatars.discourse-cdn.com/v4/letter/p/ecc23a/32.png) [@posner](https://forums.percona.com/u/posner)\
**Post date:** [August 6, 2010, 8:08am UTC](https://forums.percona.com/t/syntax-of-load-data-outfile-and-select-into-infile/1470/2 "2010-08-06T08:08:43Z")

</div>

Kamal4perc

what do mean by  
They are quite opposed to the format of LOAD DATA INFILE and SELECT …INTO OUTFILE.

load data outfile

If u want this

I want the format of performing LOAD DATA OUTFILE to select a table data into a .txt/.xls file.

select \* from table  
into outfile '/home/dir1/dir2/file.txt’fields terminated by ‘\t’;

for this  
Also I heard about SELECT…INTO INFILE loading a .txt file into a table.

load data local infile ‘/home/dir1/dir2/file.txt’ into table table\_name fileds terminated by ‘\t’;

i dont think there is load data outfile  
did u mean load data infile

similarly it is select …into outfile
