Hi
In a stored procedure i want to check a condition through query if it is false only then the remaining part of S.P should gets executed.
Thanks
Hi
In a stored procedure i want to check a condition through query if it is false only then the remaining part of S.P should gets executed.
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jaimin ShethiyaPosted Dec 9, 2024, 10:27 AM
Hello,
You can use simply if statement as below mentioned.
If you want to use if else statement then you can use below example.
Thanks
Vijay Pratap SinghPosted Dec 9, 2024, 10:13 AM
Hi
You can achieve this by using an 'IF' statement in your stored procedure to check the condition and decide whether to proceed with the rest of the procedure.
For more info please visit below article
https://www.c-sharpcorner.com/UploadFile/rohatash/if-and-while-statement-in-sql-server-2012/
https://www.c-sharpcorner.com/UploadFile/65fc13/conditional-statements-in-mysql/
Thanks