Found this about Spain for example:
As of 2010, there were over 6 million foreign-born residents in Spain, corresponding to 14% of the total population. Of these, 4.1 million (8.9% of the total population) were born outside the European Union and 2.3 million (5.1%) were born in another EU Member State.