List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:September 10 2001 2:08am
Subject:Re: INSERT SELECT QUESTION
View as plain text  
At 8:44 PM -0500 9/9/01, Marcus Young wrote:
>Hi,
>
>I'm fairly new to MySQL.  I'm trying to insert data into a table 
>where one field is derived from a SELECT on another table (a key) 
>and the other fields are defined directly (eg field_01="abcd") . 
>The formats I have been trying don't appear to be correct.  Is the 
>commbined insert possible or what is the appropriate technique?
>
>thanks in anticipation,
>
>Marcus

INSERT INTO tbl2 (col1, col2, col3) SELECT key, 'abcd', 'efgh' FROM tbl2

-- 
Paul DuBois, paul@stripped
Thread
INSERT SELECT QUESTIONMarcus Young10 Sep
  • Re: INSERT SELECT QUESTIONPaul DuBois10 Sep
  • Re: INSERT SELECT QUESTIONCalvin Chin10 Sep