Difference between revisions of "MySQL"
From Christoph's Personal Wiki
(Started article) |
(Added more info. on "LOAD DATA INFILE") |
||
Line 5: | Line 5: | ||
Example: | Example: | ||
<pre> | <pre> | ||
− | LOAD LOCAL DATA INFILE 'foo.txt' | + | LOAD [LOCAL] DATA INFILE 'foo.txt' |
INTO TABLE company | INTO TABLE company | ||
FIELDS TERMINATED BY ',' | FIELDS TERMINATED BY ',' | ||
Line 11: | Line 11: | ||
LINES TERMINATED BY '\n'; | LINES TERMINATED BY '\n'; | ||
</pre> | </pre> | ||
+ | |||
+ | where <tt>[LOCAL]</tt> is optional and the following must be met: | ||
+ | * If <tt>LOCAL</tt> is specified, the file is read by the client program on the client host and sent to the server. The file can be given as a full pathname to specify its exact location. If given as a relative pathname, the name is interpreted relative to the directory in which the client program was started. | ||
+ | * If <tt>LOCAL</tt> is not specified, the file must be located on the server host and is read directly by the server. | ||
== External links == | == External links == | ||
+ | * [http://dev.mysql.com/doc/refman/5.0/en/load-data.html MySQL Reference Manual - "LOAD DATA INFILE" entry] | ||
* [http://www.mysql.com/ MySQL] — Offical website | * [http://www.mysql.com/ MySQL] — Offical website | ||
* [http://en.wikipedia.org/wiki/Mysql Wikipedia article on '''MySQL'''] | * [http://en.wikipedia.org/wiki/Mysql Wikipedia article on '''MySQL'''] | ||
[[Category:Technical and Specialized Skills]] | [[Category:Technical and Specialized Skills]] |
Revision as of 16:10, 26 January 2006
MySQL is a multithreaded, multi-user, SQL (Structured Query Language) Database Management System (DBMS).
External data input
Example:
LOAD [LOCAL] DATA INFILE 'foo.txt' INTO TABLE company FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';
where [LOCAL] is optional and the following must be met:
- If LOCAL is specified, the file is read by the client program on the client host and sent to the server. The file can be given as a full pathname to specify its exact location. If given as a relative pathname, the name is interpreted relative to the directory in which the client program was started.
- If LOCAL is not specified, the file must be located on the server host and is read directly by the server.
External links
- MySQL Reference Manual - "LOAD DATA INFILE" entry
- MySQL — Offical website
- Wikipedia article on MySQL