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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:37:33+00:00 2026-06-17T16:37:33+00:00

At work we have a SQL Server database. I don’t know the db that

  • 0

At work we have a SQL Server database. I don’t know the db that well. I have created a new column in the table for some new functionality….straight away I have started seeing errors

My statement was this:

ALTER TABLE users
ADD locked varchar(50) NULL
GO

The error is:

Insert Error: Column name or number of supplied values does not match table definition

I have read that the error message appears when during an INSERT operation either the number of supplied column names or the number of supplied values does not match the table definition.

But I have checked so many times and i have changed the PHP code to include this columns data yet I still receive the error.

I have run the SQL query directly on the db and still get the error.

Funny enough the query which gets the error is an Update.

UPDATE "users"
SET "users"."date_last_login" = GETDATE()
WHERE id = 1
  • 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-17T16:37:34+00:00Added an answer on June 17, 2026 at 4:37 pm

    Have you considered it could be a trigger causing it? 

    This is the error message you would get.

    If its an Update action causing it check trigger actions that Updates on that table run.

    Do it with:

    #sp_helptrigger Users, 'UPDATE';
    

    This will show triggers occuring with ‘update’ actions.

    If there is a trigger, grab the triggers name and run the below (but replace TriggerNameHere with real trigger):

    #sp_helptext TriggerNameHere;
    

    This will give you any SQL that the trigger runs and could be the INSERT the error message is referring to.

    Hope this helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a column in a SQL Server database table, there is a column
I have a set of methods that do some utility work over SQL connection,
I have a table on a SQL Server 2000 database, which I want copied
I have a table called Field in my SQL Server database. The table has
I have an existing MVC3 application and database that is on a SQL Server
I have strange result in database (SQL Server 2008)-. I work on a ASP.NET
At work, we have several applications with databases in a centralized SQL server. Whenever
I have a problem with an sql query that will not work if I
We have a web application talking to a Postgres SQL database at work -
I'm having an sql error that i can't work out. I have to update

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.