MySQL supports six basic types of constraints for ensuring data integrity:
KEY. In this article, I introduce you to each constraint type and provide examples for how they work. The examples include a series of
TABLEstatements that demonstrate different ways to incorporate constraints into your table definitions. If you’re not familiar with the
TABLEstatement or how to create tables in a MySQL database, refer to an earlier article in this series that introduces you to the statement.
In short, they support the same set that SQL Server users are used to. But do read on to see the nuances behind each of these.