Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8953277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:03:48+00:00 2026-06-15T14:03:48+00:00

I have a table Table1 with 59 columns. Table2 is a copy of Table1

  • 0

I have a table Table1 with 59 columns. Table2 is a copy of Table1 with one extra column, COLUMN 60 at the end. Hence table2 has 60 columns.

I am trying to copy the values from table1 to table2 and set value of the extra column in table2 to “value”

Something like this

INSERT INTO Table2
   SELECT * FROM Table1, 'value' AS 'COLUMN 60'

How can I do this? Using the code above give me an error:

An explicit value for the identity column in table ‘TableLocation’ can only be specified when a column list is used and IDENTITY_INSERT
is ON.

I do not want to specify column names because there are too many of those.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T14:03:49+00:00Added an answer on June 15, 2026 at 2:03 pm

    Try this:

    SET IDENTITY_INSERT dbo.Table2 ON
    
    INSERT INTO Table2
    SELECT *, 'value' AS 'COLUMN 60' FROM Table1
    
    SET IDENTITY_INSERT dbo.Table2 OFF
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two tables - table1 and table2 table1 has 14 columns and table2
I have two tables: table1, table2. Table1 has 10 columns, table2 has 2 columns.
I have a table say table1 which has 3 columns column1, column2 and column3
I have two tables with identical structure except for one column... Table 2 has
I am attempting to copy data from specific columns in one row, and have
I want to copy data from one table into another table where the columns
I have two tables, lets say table1 and table2 with common columns, id and
Im using SQL Server 2005. I have a table1 with 3 columns. And table2
Sometimes if I want to quickly copy records from one table to another (that
I have a table full of data, where one column is full of different

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.