我有超过 3 个 sql 表。
现在我正在尝试select count(*)
从所有表中,但我该怎么做呢?
我想知道数据是否存在于所有表中
I need to check the row count from previous business day ~15% for any table and it sends an email alert
我试过如下请帮我完成
PROCEDURE [dbo].[SendEmail_WSOTableDataAlert]
AS
BEGIN
declare @err int
IF NOT EXISTS (select 1 from T1) OR
NOT EXISTS (select 1 from T2)
BEGIN
set @error=1
END
//here i need to show which table is having empty data how can i do this please help
SET @tableHTML = @tableHTML + +
'</TABLE>' + @EmailFooter;
@error =1
then
发邮件
END