I want to set that my table will only have 4 rows or 4 records. For this I’ve created a table using the following syntax:
CREATE TABLE `zero`.`table_limit`
`name` varchar(20) DEFAULT NULL
)
ENGINE=InnoDB DEFAULT CHARSET=latin1 MAX_ROWS=4
I think it is right still when I trying to insert more than 4 rows, it is not showing any error.
Can any body tell me where i m doing mistake?
You need to use a BEFORE INSERT trigger.