I was told that we never delete records from the table, because it will be needed in future. and can I know is there any alternative than DELETE where I can DEACTIVATE the row than completely removing the row from table?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
You can add a
bitcolumn to your tables – call it something likeIsActiveorIsDeletedWhen you
INSERTdata make sure that the data is marked with the correct value:Then when you what to make the records unavailable you will do an
UPDATEto flag the records the opposite way:When you run your queries you will filter the data out according to this flag. We implement this type of soft delete throughout our system and it works to hide records.