SQL Query to get all empty tables in database


This post explains how to use sql query to get all empty tables in a database and email them in a table format. Problem Statement : SQL query to return list of tables in a database without any rows and send email in a table format. Solution: SQL Send Email in tablular format Now we need to send the above result set as an email in tabular format. To do so we can use below query. Final Thoughts Below is the final query which can be used as a stored procedure to send email with tabular format for all the tables which are empty in a database.