DECLARE @count INT SET @count = (SELECT COUNT(*) FROM test1) IF @count > 20 BEGIN PRINT 'You cannot insert more than 20 records' END ELSE INSERT INTO test1 VALUES('1', 'Amit', 'Bangalre')
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)