How to deleted record as false in SQL Server from winforms UI using c#? <p>I have a problem to set deleted record as false in my SQL Server.I tried a lot.</p> <p>My problem is i have a table in some Of the columns id,name etc...id as primary key constraint. When the user delete the record? so that record should be present on the table. i will make that record as false in my table?</p> <p>In future he want to add the record with the deleted id? we give the chance to add a record with that id?</p> <p>plz tell me the example of doing this? i tried a lot but i don't know. because primary key doesn't accept duplicates so i strucked here.</p> <p>My delete stored procedure:</p> <p>If user press the delete button in my UI:</p> <p>This stored procedure is execute in my back-end:</p> <pre><code>update table set id=id*-1, flag=1 where id=@id and flag=0; </code></pre> <p>In front i have shown record is deleted.</p> <p>But if he want to add the record with that deleted id. Primary key voilation error from my database.when he insert the record.</p> <p>Thanks</p>