MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Gleb Paharenko Date:November 4 2004 10:58pm
Subject:Re: Load data Infile update?
View as plain text  
Hi.

If your table has a unique index on field 'name',
then use 

  load data infile 'file' replace into table 'table';


"Lewick, Taylor" <tlewick@stripped> wrote:
> Can I perform an update on a table using load data infile..?
> 
> If I have the following table...
> 
> Name   Score  Rank
> John   NULL   NULL
> Susan  NULL   NULL
> 
> And I have a data file that has...
> 
> John,95,1
> Susan,89,2
> 
> Any idea if this can be done?
> Thanks,
> 


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   Gleb.Paharenko@stripped
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
       <___/   www.mysql.com



Thread
Load data Infile update?Taylor Lewick4 Nov
  • Re: Load data Infile update?Gleb Paharenko5 Nov