AN independent Scotland would have an immigration policy characterised by "fairness and compassion" which would attract skilled workers and help achieve sustainable economic growth, the Culture and External Affairs Secretary has said.

Such a system would be aimed for in the event of a Yes vote in the referendum, Fiona Hyslop said.

The comments were made as MSPs debated the findings of the 2011 census.

Labour's Patricia Ferguson said the census results help make the case for Scotland staying in the UK.

Scotland's population is "ageing faster than that of the UK as a whole" and extra cash would be needed to pay for pensions if the country became independent, Ms Ferguson said.

Ms Hyslop said that the 2011 census shows the highest-ever population for Scotland at 5,295,403.

"Much of the population increase, however, was due to net migration to Scotland and we are proud of the warm welcome we give migrants to Scotland, encouraging those who want to work hard to build a life here for their families and we know they enrich our culture and communities with their traditions, skills, food and languages," Ms Hyslop said.

The 2011 census shows for the first time that Scotland has more people aged 65 and above than those under 16.

Population projections show rise in the number of pensioners between 2012 and 2037 will be less than across the UK as a whole, at 27% against 31%, Ms Hyslop said. "With independence we would be able to grow our working-age population by ensuring young Scots have the opportunity to build a career in Scotland, and a controlled immigration policy will be another gain."

Immigration policy in an independent Scotland would take into account "Scottish principles of fairness and compassion", she said.