Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Real neat idea Peter, and thanks for sharing it.
Cheers,
Jim N
>>Mark,
>>
>>Actually, I think the problem is the reverse. But I really should have mentioned (but didn't because I'm told the vast majority operate that way) that it only matters with SET DELETED ON. I run with DELETED OFF as my default.
>>
>>I hope this covers it off for those following.
>>
>>Cheers,
>>
>>Jim N
>
>And if you do run with DELETED OFF (as I do) then you certainly don't want to waste resources by putting an index on DELETED().
>
>As an aside, I am having good luck with a somewhat unorthodox approach: when I want to "delete" a record, I set all the integer fields to the negative of themselves. This includes all my primary and remote keys and a few other important fields. This pretty much removes the record from sight and, if necessary, I can always add the test: primary key > 0.
>
>Of course, I could just zero and or blank all the fields but I like having the audit trail in the database in case someone has a real or imagined problem with data loss.
>
>Peter Robinson
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement