How to get a field's value for all nodes in a content type?
In your case, you can probably simply query the field data table, with a condition on the entity type and bundle.

In any case, something like:

$field_name = 'FIELD_NAME';
$result = db_select("field_data_{$field_name}", 'f')
  -&gt;fields('f', array('entity_id', "{$field_name}_value"))
  -&gt;condition('entity_type', 'node')
  -&gt;condition('bundle', 'article')
  -&gt;condition('deleted', 0)
  -&gt;range(0,10)
  -&gt;execute();

foreach ($result as $row) {
  // drupal_set_message($row-&gt;field_name_value); // example
  drupal_set_message('&lt;pre&gt;'.print_r($row,1).'&lt;/pre&gt;');
}


As an aside you might want to join on the node table to only select published content, but that's the gist of it.