Spain has torpedoed any chance of Scotland negotiating a place in the EU while the UK negotiates to leave.
http://www.bbc.co.uk/news/uk-scotlan...itics-36656980
If Sturgeon wants Scotland in the EU, she will have to win a referendum, wait for the UK to complete Brexit, then start negotiations to join. Which will take quite a long time.