Sql Function That Returns A Boolean