데이터베이스의 테이블에서받는 전자 메일을받는 사람에게 전자 메일을 보냅니다. 임씨는 매 시간마다이 이메일을 보내려고합니다. 내가 어떻게 할 수 있니?1 시간마다 SQL 서버 전자 메일 보내기
이것은 내가 지금 가지고있는 것입니까?
DECLARE @recipient VARCHAR(4000)
USE data
SELECT @recipient = STUFF((SELECT ';' + email
FROM dbo.email
FOR XML PATH('')
), 1, 1, '')
EXEC msdb.dbo.sp_send_dbmail
@profile_name='SQL Server Alerts System',
@recipients = @recipient,
@subject='Test message',
@body='This is the body of the test message.
Congrates Database Mail Received By you Successfully.'
특히 테스트 할 때 사람들을 스팸하지 않도록주의하십시오. –