I used the following command
/give @p diamond_axe 1 0 {Can Destroy:oak}
And it said
- missing '}' line 1, Column 2.
There are no columns though? Why won't it work?
You need to know what version of Minecraft you are using, because the command changes over time.
I assume you want this for the latest version. In the latest version of vanilla Minecraft, the command is:
/give @p minecraft:diamond_axe{CanDestroy:["minecraft:oak_log"]} 1
For more than one block, for example, logs and planks, you can do:
/give @p minecraft:diamond_axe{CanDestroy:["minecraft:oak_log","minecraft:oak_planks"]} 1
It is also worth noting that the CanDestroy NBT flag will ONLY work in adventure mode. If the player is in normal survival, the CanDestroy NBT flag is ignored - the axe will break any wood block as it normally would.
Your command won't work because:
Older versions would need the following:
Minecraft 1.8 to 1.12.2:
/give @p minecraft:diamond_axe 1 0 {CanDestroy:"log:0"}
Before Minecraft 1.8:
/give @p minecraft:diamond_axe 1 0 {CanDestroy:"17:0"}