Inserting a text file to MySQL

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: David A. Sinck
Date:  
Subject: Inserting a text file to MySQL

\_ SMTP quoth Sundar on 2/10/2003 10:26 as having spake thusly:
\_
\_ Hi,
\_
\_ I am retrieving some text files from our Oracles server and been asked
\_ to populate some feasible local server. So, obviously I selected MySQL,
\_ though I haven't personally used it much. Now, I have a problem. How do
\_ I store a text file in MySQL?

create table foo (
thefile text
);

insert into foo ( [contents of file]);

YMMV. There's also 'longtext' and 'verylongtext' IIRC.

David