SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Updating a Table with an autonumber

  1. #1
    SitePoint Zealot
    Join Date
    Aug 2011
    Location
    Trinidad and Tobago
    Posts
    188
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Updating a Table with an autonumber

    I have a table that I want to insert many rows of information into however it has anautonumber as the primary key. How can I insert 3 columns of data and 20 rows of information into this table in using sql.

    Thank you

  2. #2
    SQL Consultant silver trophybronze trophy
    SitePoint Award Recipient r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    38,463
    Mentioned
    35 Post(s)
    Tagged
    1 Thread(s)
    Code:
    INSERT
      INTO daTable
         ( column9
         , column3
         , column7 )
    VALUES
      ( 'asdf' , 'qwer' , 4567 )
    , ( 'fghj' , 'tyui' , 5678 )
    , ...
    , ( 'vbnm' , 'ghjk' , 0937 )
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Zealot
    Join Date
    Aug 2011
    Location
    Trinidad and Tobago
    Posts
    188
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks

Bookmarks

Posting Permissions

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