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 815945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:45:31+00:00 2026-05-15T01:45:31+00:00

SQL Server 2000 Say if I have a table like CREATE TABLE [Message] (

  • 0

SQL Server 2000

Say if I have a table like

CREATE TABLE [Message] (
    [MessageIdx] [int] IDENTITY (1, 1) NOT NULL ,
    [Message] [varchar] (1024) COLLATE Latin1_General_CI_AS NOT NULL ,
    [column1] ... ,
    [column2] ... ,
    ... ,
    [ValidUntil] [datetime] NULL ,
    CONSTRAINT [PK_Message] PRIMARY KEY  CLUSTERED 
    (
        [MessageIdx]
    ) WITH  FILLFACTOR = 90  ON [PRIMARY] 
) ON [PRIMARY]
GO

Since there’re too many columns, so I am trying to insert value without specify column names explicitly. I want to insert a new row with all columns except ‘MessageIdx’ and ‘ValidUntil’ not specified. Therefore, I definitely don’t want to type all column names.
I tried below statement but it causes error. How can I do that? Thanks.

insert into message values (DEFAULT,'blah',something, ..., DEFAULT);

EDIT: AFAIN, SQL 2005 server you can skip the identity column when inserting. So that will be

insert into message values ('blah',something, ..., DEFAULT);

But is there any work around for SQL server 2000?

  • 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-05-15T01:45:31+00:00Added an answer on May 15, 2026 at 1:45 am

    you have to specify column names if you use set identity_insert

    but you can do this

    set identity_insert caconfig..fxmessage on;
    insert into message (MessageIdx,[Message],[ValidUntil) 
    values (1,'blah',GETDATE());
    set identity_insert caconfig..fxmessage off;
    

    I assume what you really want is this, it will generate the identity value for you

     insert into message ([Message],[ValidUntil) values ('blah',GETDATE());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 514k
  • Answers 515k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Your code didn't come through but you can control the… May 16, 2026 at 6:23 pm
  • Editorial Team
    Editorial Team added an answer Personally I prefer the last option (although using a List<T>… May 16, 2026 at 6:23 pm
  • Editorial Team
    Editorial Team added an answer I've written a long explanation of EF metadata paths; you… May 16, 2026 at 6:23 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Lets say I have a table in a sql server 2000 database called TransactionType:
Let's say I have a SQL Server 2000 table, any name will do, it's
In SQL Server 2005, I have a table say tbl_Info. There I have one
SQL Server 2000 I backup a table like below: select * into bkp_table from
Using SQl Server 2000 I have a stored procedure that joins 2 tables and
Using Vb.net/SQL Server 2000 updating a row via a gridview/sqldatasource Stored proc: @ISTag varchar(10),
Is there a way to stop a SQL Server 2000 DTS (not SSIS) package
(Using SQL Server 2008) I need some help visualizing a solution. Let's say I
Lets say I have a table: -------------------------------------- | ID | DATE | GROUP |
Using SQL Server 2000 and Microsoft SQL Server MS is there a way to

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.