@DSilvaIt's very much apples and oranges. While I can sympathise with the point, the UK's relationship with the EU is a very different one to the UK and Scottish one.
The UK joined the EU in 1973 and left less than 50 years later. Scotland has been defacto joined with England and Wales since 1603 and dejure a part of the UK since 1707. There is far more shared history, successes, culture etc than the UK will ever have with the EU.
Economically, there is far more linking the UK and Scotland. For one, we share the same currency. The SNP is split on what its currency plans are but could well have to keep Sterling, which would immediately mean that their monetary policy is at least partly made by the Bank of England.
Even if they could join the EU, the Euro would have even more issues - less control over monetary policy and they'd have to cut their deficit massively to even be allowed to use the Euro.
As for joining the EU, good luck:
As a percentage of Scotland’s GDP the notional deficit increased from -7.4% in 2018-19 to -8.6% in 2019-20. For comparison the UK’s deficit rose from -1.9% of GDP to -2.5% over the same period. New members of the EU are required to have a deficit less than 3% of GDP.
And even if the deficit wasn't an issue, you've got to hope that other EU nations don't block Scotland entering the bloc. There's some debate whether Spain and / or Belgium would block their membership due to their own independence movements.
In terms of exports, at its peak in 2002, 54% of the UK's exports when to the EU. It has fallen since then and we're down to 43% as of 2019. Around 60% of Scotland's exports go to the rest of the UK. In fact, Scotland exports more to the rest of the world (excluding the UK) than it does to the EU.
The EU has never been responsible for UK Defence. On the other hand, the UK is very much committed to the defence of Scotland. While the SNP bleats about the UK Nuclear Deterrent, the UK government is committed to RAF Lossiemouth and various other military installations in Scotland that maintain security and pump money into the local economy.
Any attempt at Scotland trying to have its own military is laughable and it'd be relying on the UK for its security long after independence. Russian air and sea probing wouldn't just stop. What would a Scottish Defence Force have to meet them? It certainly wouldn't be Typhoons or F-35Bs in the air or Type 45s at sea. They'd probably have to make do with armed Hawk trainers and coast guard style cutters.
The SNP seems rather anti-NATO, so they might not even be able to rely on help from the UK, US etc. If they did want to join NATO, they'd also certainly have to spend more on Defence than they'd want to.
The SNP believe that they'll defacto get control of the North Sea's natural resources as this is the only chance they've got to claim that Scotland can survive independently. The issue is that these fossil fuels are becoming less important, especially as Scotland plans to be carbon neutral by 2045.
It's also clear that, despite the SNP's propaganda, per capita Scotland gets more public funding than the rest of the UK - almost £2000 per person.
Summary:
While the people of Scotland would be entitled to vote for independence, they'd find that trying to extract themselves from the UK far more difficult than the UK has from the EU. They'd have no military, diminishing oil and gas, no independent currency, a large deficit and quite possibly no EU membership.