Getting the exact edited data from a column in SQL Server I have two Tables:

Articles(artID, artContents, artPublishDate, artCategoryID, publisherID).

ArticleUpdated(upArtID, upArtContents, upArtEditedData, upArtPublishDate, upArtCategory, upArtOriginalArticleID, upPublisherID)


A user logs in to the application and updates an article's contents in the artContents column. I want to:


Know which Changes the user made to the article's contents?
Store both versions of the Article, the Original version and
the Edited Version!


What should I do for the above two task:


Are there any necessary changes in the tables?
What is the query for getting exact edited data of the artContents column?


(The exact edited data means that there may be 5000 characters in the columns. The user may edit 200 characters in the middle or somewhere else in column's characters. I want the exact edited characters, before the edit and after the edit.)



Note: I am using ASP.NET with C# for Developing
There's a solution for SQL Server. You can create triggers for tracking these changes, tables where the old and new values will be stored and when a trigger is fired, insert the old and new values into the storage tables

You can also use a tool that will track the changes, I use ApexSQL Audit  - doesn't actually store both versions of the complete table, but stores old and new values for the modified column, so you can recreate the old versions. As it stores all changes in database tables, so I've created some custom reports

And to answer your questions directly


  Are there any necessary changes in the tables?


Yes, triggers are added


  What is the query for getting exact edited data of the artContents column?


It doesn't show just the modified characters, but the old and the new column values