I have a table named batch1 with just one column in it id which is primary key.
I can insert data into it with following query.
INSERT INTO batch1 VALUES(NULL); Now I need to set limit on records for this table so it may only insert required number of rows. For example say if limit is set 1000, the above table must not insert more records above that and give error.
I am storing limit in other table. What are my option other than LOCKS?