Hmmm 2nd Scottish referendum! Lets think about a possible timeline.

UK votes for Brexit which takes at least 2 years to achieve.
Cameron resists calls for a 2nd Scottish referendum, until the terms of Brexit are negotiated.
SNP demands referendum as soon as possible.
Cameron resigns. Boris installed as PM, Gove as Home Secretary and Farage is elevated to the Lords and becomes Foreign Secretary.
Britain leaves the EU and adopts a Norway style agreement with the EU which includes free trade and free movement of people.
SNP still demands a referendum and Boris agrees it's a good idea and along with his old comrades vigorously campaigns for a Scottish exit (Scexit?) from the UK.
The Scots vote for independence and find themselves outside of the UK and EU. They apply for membership of the EU, but Jean Claude Junker says they have to get in line behind Serbia, Bosnia, Macedonia, Kosovo, Albania, Iceland and Turkey. It's pointed out that as a new nation Scotland has much work to do in terms of getting public spending under control and establishing a stable currency before they are even considered as an applicant country.
Nicola Sturgeon tells Juncker that she has a democratic mandate from the Scottish people to join the EU. Junker replies that he dosn't understand the word democratic and dosn't care either.
Jean Claude Junker is overheard muttering in a Brussels bar about being sick of these ficking Brits!
Meanwhile, Iran discovers a vast new oilfield and announces that it is leaving OPEC as it now believes that market forces should determine the price of oil.
The laughter in England causes an earthquake roughly along the Anglo-Scots border and Scotland drifts off into the North Sea.