Is there a way to 'mark' a single row in a table and automatically unmark others? Is there a way to flag one row in a database table (MariaDB/MySQL mostly, but I just want to know), so that there is only one row in a table that has that flag? If I set that flag (for eg. 'active') for any other row, then the row which currently has the 'active' flag is automatically unset. The idea is to not have to manually unset the older 'active' row when there's going to be a new one. I just insert/update a row with 'active'=1 and it's automatically the only one.

To clarify my intent, I'm not looking for a method of doing this manually - I'm trying to find out if there is a built-in feature in a database system, since this is a pretty common use case. Hence, the post in DBA, instead of SO. I don't even know what tags to use for this question.
Wrong solution.

Have another table with one row that you keep changing.  It contains the PRIMARY KEY of the one marked row.  (Delete the row if you want to have no rows 'marked'.)  JOIN the two tables to get the marked rows.