sql check if table exists before insert

Hello readers! In this post I have shared the details about “sql check if table exists before insert”. Okay, let’s move on to the article.

sql check if table exists before insert

IF (EXISTS (SELECT * 
                 FROM INFORMATION_SCHEMA.TABLES 
                 WHERE TABLE_SCHEMA = 'TheSchema' 
                 AND  TABLE_NAME = 'TheTable'))
BEGIN
    --Do Stuff
END

Conclusion

I hope this post helps you to know about “sql check if table exists before insert”. If you have any questions regarding this article please let us know via the comment section. Share this article with your friends and family via social networks.

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coder Diksha. Here, I post about programming to help developers.

Share on:

Leave a Comment