There is no feature in MySQL to declare a limit on the rows in a table.
The CREATE TABLE statement has an option MAX_ROWS=N but it doesn't enforce a limit. It's a hint to the storage engine of how many rows you are likely to insert, so the storage engine it can allocate storage or initialize data structures.
To enforce a limit of 100 rows, you could make a table with integers from 1 to 100, and in your signup table, make a foreign key to that table of integers.
CREATE TABLE numbers ( num TINYINT UNSIGNED PRIMARY KEY) ); -- fill the above table with values 1 to 100... CREATE TABLE SignUp ( id TINYINT UNSIGNED PRIMARY KEY, email VARCHAR(80) NOT NULL, FOREIGN KEY (id) REFERENCES numbers (num) );
The id must be unique, you can only use each number on one row. Therefore the table can only have 100 rows.
It's up to your client app to pick an unused number, then insert it. This is somewhat harder than it sounds, since you could have more than one user trying to sign up at the same time, so both might choose to use the same number. So the app has to catch errors and retry even after trying to choose an unused number.