如何创建返回此 SELECT 语句的(表格)结果的 T-SQL 存储过程:
USE automation
SELECT insurer.name,
insurer.case_name,
contact.name,
contact_address.line_1,
contact_address.city,
state.state_abbr,
contact_address.zip
FROM person as insurer
INNER JOIN persons_relationship on persons_relationship.person2_id = insurer.person_id
INNER JOIN person contact on contact.person_id = persons_relationship.person_id
INNER JOIN person_address contact_person_address on contact_person_address.person_id = contact.person_id
INNER JOIN address contact_address on contact_address.address_id = contact_person_address.address_id
INNER JOIN state on state.state_id = contact_address.state_id
insurer.person_class_id = 2