if exists
エラーを発生させ、print
一致する行数を増やしたかったのですが、これは機能しません。助けてください 。
if exists (select * from [rto] a
inner join rt b
on a.NUM=b.TABLE_NAME
where a.START_YEAR between b.YEAR_START and b.YEAR_STOP)
Raiserror ('Matched recs found',16,1)
print 'There are' + cast(@@rowcount as varchar(20)) + 'matched rows'