SQL: Added index fields to reference table