Results 1 to 2 of 2

Thread: Insert Into

  1. #1
    Join Date
    May 2003

    Unanswered: Insert Into

    I have a table that has about 20 columns and the primary key "ID" is an autonumber.

    I need to insert a new row that has the same values as ID 19. I have tried the following and failed.

    INSERT INTO table1 (SELECT * FROM table1 WHERE ID = 19);

    I know the INSERT statment will work if I name all the columns. However, I try not to because if I add a new column to the table in the future, I will need to modify the INSERT INTO statement.

    Any suggestion?



  2. #2
    Join Date
    Feb 2004
    Never use stars like this, it is bad design and will haunt you or some other poor coder later. Because of the ID field you won't be able to do it any way.

Posting Permissions

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