|
Posted by Ed Murphy on 02/23/07 04:00
Eugene wrote:
> I have the following table
>
> Name Date Wish Valid
>
> Name is person's name, date defaults to getdate() and is never
> assigned directly (datetime field), Wish is some message, and Valid is
> bit, 1 indicates if the wish is the latest, and therefore valid. All
> previous wishes are kept in database, and are "invalidated" by setting
> the Valid to 0.
The 'Valid' column is redundant (you can use MAX(Date) instead) and
breakable (what if a row with Valid = 1 is deleted?). I'd ditch it
if I were you.
Navigation:
[Reply to this message]
|