dimanche 8 février 2015

Unable to update or insert values table with DateTime column defaulted to GETDATE


I have atlered table by adding Datetime column. This column is not null and also default value from GETDATE().



ALTER TABLE myTable ADD myDateColun DATETIME NOT NULL DEFAULT (GETDATE())


I'm trying to update, I'm unable to update or insert values table



update myTable set myDateColun = GETDATE() where id = someNumber


Its throwing me SQL error



Column name or number of supplied values does not match table definition.



Note: This table has trigger defined on insert and delete scenario for data, which updates synonym table linked to this table in other database.


Any ideas what can be reason for SQL errors in above scenario?





Aucun commentaire:

Enregistrer un commentaire