In general application with tabular data, may have selected using a checkbox on each row. In that case, there should be a master checkbox to check/uncheck all table rows.
Here we will discuss an example table that will have a master checkbox on the header and each table row with its own checkbox.
A user can check/uncheck all rows using a single master checkbox on the header.