MySQL - Constraints

EMPNO ENAME SAL DEPTNO
1 A 5000 1
2 A 6000 1
3 C 7000 1
4 D 9000 2
5 E 8000 2

Primary Key

Composite Primary Key

Note:

Why you not make ROWID as a primary key?

ROWID is unique but not immutable; it can change due to table operations like EXPORT/IMPORT, TABLE MOVE, or REBUILD INDEX.