Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Location
    New York City
    Posts
    3

    Unanswered: MySQL Query Help

    Hi -

    I need help with building what's probably a simple query. Here's what I have:

    Table A and Table B
    Each with three fields ... the first two calling for the same data, the third being unique from Table A to Table B

    I would like to populate Fields 1&2 of Table B with the data from Fields 1&2 from Table A, and then set the value of Field 3 of Table B to a specific value (will be identical for each record in Table B).

    Any help here with building a query that will accomplish this would be greatly appreciated.

    Thanks!

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Code:
    insert
      into tableB
         ( field1
         , field2
         , field3 )
    select field1
         , field2
         , 'specific'
      from TableA
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •