Inserting a text file to MySQL

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

When you say

insert into foo ( [contents of file]);

Does it mean

insert into foo ( filename );

I am just trying to achieve it with a SQL query.

- Sundar


David A. Sinck wrote:

>\_ 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
>---------------------------------------------------
>PLUG-discuss mailing list -
>To subscribe, unsubscribe, or to change you mail settings:
>http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>
>