Results 1 to 3 of 3

Thread: Insert into

  1. #1
    Join Date
    Mar 2012
    Posts
    2

    Question Unanswered: Insert into

    I need to


    INSERT IGNORE INTO
    prime.work_queue
    (queue_id,owner_id,wqo_last_modified,wqo_last_modi fied_user_id)
    VALUES ( 17, 600, NOW(), 12611) ;


    But the first VALUE 17 is not the only one.

    I have from 1 to 34

    Is there a way to include it in the query ?

    Like : VALUES ( (1,34) , 600, NOW(), 611); But this did not work

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Code:
    INSERT IGNORE
      INTO prime.work_queue
         ( queue_id, owner_id, wqo_last_modified, wqo_last_modified_user_id )
    VALUES 
         (  1, 600, NOW(), 12611)
       , (  2, 600, NOW(), 12611)
       , (  3, 600, NOW(), 12611)
       , (  4, 600, NOW(), 12611)
       , (  5, 600, NOW(), 12611)
       , (  6, 600, NOW(), 12611)
       , (  7, 600, NOW(), 12611)
       , (  8, 600, NOW(), 12611)
       , (  9, 600, NOW(), 12611)
       , ( 10, 600, NOW(), 12611)
       , ( 11, 600, NOW(), 12611)
       , ( 12, 600, NOW(), 12611)
       , ( 13, 600, NOW(), 12611)
       , ( 14, 600, NOW(), 12611)
       , ( 15, 600, NOW(), 12611)
       , ( 16, 600, NOW(), 12611)
       , ( 17, 600, NOW(), 12611)
       , ( 18, 600, NOW(), 12611)
       , ( 19, 600, NOW(), 12611)
       , ( 20, 600, NOW(), 12611)
       , ( 21, 600, NOW(), 12611)
       , ( 22, 600, NOW(), 12611)
       , ( 23, 600, NOW(), 12611)
       , ( 24, 600, NOW(), 12611)
       , ( 25, 600, NOW(), 12611)
       , ( 26, 600, NOW(), 12611)
       , ( 27, 600, NOW(), 12611)
       , ( 28, 600, NOW(), 12611)
       , ( 29, 600, NOW(), 12611)
       , ( 30, 600, NOW(), 12611)
       , ( 31, 600, NOW(), 12611)
       , ( 32, 600, NOW(), 12611)
       , ( 33, 600, NOW(), 12611)
       , ( 34, 600, NOW(), 12611)
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Mar 2012
    Posts
    2
    I thought So.


    Thanks

Posting Permissions

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