Values not updating but showing rows affected

2.2k Views Asked by At

THERE IS NO TRIGGER ON THIS TABLE.

I'm facing strange behaviour of sql server. One of the table column value not updating.

Here is the query and output:

Select statement

Now if I execute the update statement, it executes successfully:

Update statement

As per update statement all the clientId values should be 10, but it still remains 2. Here the select query result after executing update statement:

Select statement

I really don't find any possible issue of this behaviour. Please help to solve this puzzle.

This might helpfully to help me:

  1. SQL Server 2012 Express
  2. Table:

Table visual info

  1. Schema: Table schema

  2. If I rename the column name clientId to clientId2 or anything then update works. But if I rename the changed column name to clientId with udpated value then the updated values become 2 again.

  3. If I keep the columne name same but table name change to Company2 or anything then then clientId values update fine.

  4. https://raw.githubusercontent.com/codenamejakir/Demo-Video/master/sqldemo.swf

  5. With transaction: https://raw.githubusercontent.com/codenamejakir/Demo-Video/master/SqlLive.swf

Overall I have noticed that if the table name "Company" and column name "ClientId" then column value not updating.

Thanks.

0

There are 0 best solutions below