How to insert bunch of records in table, using transaction complete or rollback concept?

Posted 2 years ago by erhsaikhasif

Hello, I have to insert the multiple records in student table using post method. I will send this student entry in json array. But the insertion process must be either insert all or none. There is a concept in SQL either transaction all or none or rollback. How can I achieve this? If you have alternative solution for this then please suggest me. I tried this by using foreach loop , but their is no guarantee of insertion of all records. Please help me. Thanks.

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.