Home Forums SQL Server 2016 SQL Server 2016 - Development and T-SQL IF ROW COUNT = 0 GO TO END RE: IF ROW COUNT = 0 GO TO END
BI_Developer
SSC Eights!
Points: 908
More actions
July 11, 2018 at 3:48 pm
#1997233
Phil Parkin - Wednesday, July 11, 2018 6:56 AMif not exists (select 1 from TableA) return;Should exit the proc at that point, if zero rows are found.
if not exists (select 1 from TableA) return;
That worked just fine. Thanks!