Are all Group 2 compounds ionic?

Electronegativity is a measure of the tendency of a bonded atom to attract the bonding electrons to itself.
 
The electronegativity of elements to the right and top of the periodic table is higher.
 
Electronegativity H
2.2
He
 
Li
1.0
Be
1.6
B
2.0
C
2.6
N
3.0
O
3.4
F
4.0
Ne
 
Na
0.93
Mg
1.3
Al
1.6
Si
1.9
P
2.2
S
2.6
Cl
3.2
Ar
 
K
0.82
Ca
1.0
Ga
1.6
Ge
1.8
As
2.2
Se
2.6
Br
3.0
Kr
 
Rb
0.82
Sr
0.95
In
1.8
Sn
2.0
Sb
2.1
Te
2.1
I
2.7
Xe
 
Cs
0.79
Ba
0.89
Tl
1.6
Pb
2.3
Bi
2.0
Po
2.0
At  

Electronegativity decreases going down a group and increases across a period.
Thus metallic elements have lower electronegativities than nonmetallic elements and have a higher tendency to exist as cations in their compounds.
 
When considering binary compounds (those containing only two elements), the type of bonding between the elements can be correlated with the difference in electronegativity of those elements.
 
Binary compounds where the difference in electronegativity is 2 or more are ionic.
Pure covalent bonds are between the same atom where the difference in electronegativity is zero.
Polar covalent bonds are between different atoms where the electronegativity difference is less than 2.

Metals which have higher electronegativity (due to being at the top of their group or farther to the right in the period) have polar covalent bonds in their compounds with nonmetals.
 
Two examples of this type of metal are beryllium (Be) and its diagonal neighbour aluminium (Al).