Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i have a database sss_lms in which in one table i want to restrict the insertion of a new row after one row is already inserted
Posted

May be the simplest solution can help you?..

Write in your insert query:

SQL
IF(SELECT COUNT(*) FROM sss_lms)=0
BEGIN
/* Insert query*/
...
END
 
Share this answer
 
Put in a BEFORE INSERT trigger into the table.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900