benjisail benjisail - 1 year ago 64
MySQL Question

How can I ensure that there is one-and-only-one row in DB table?

I would like to ensure that my MySQL table named "myTable" has one-and-only-one row.

So I need to be able to do Update on this row but obviously Insert and Remove should be not possible.

I am asking this question because of this Stack Overflow answer


Answer Source

Two suggestions for you, one or both which may work depending on the particulars of the data you're trying to store:


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download