Yes, not only 1st and 2nd group elemet oxides, oxides and hydroxides of all the metals are alkaline in nature.Depend upon the metallic nature its basic nature will depend, for example first group elements are more electropossitive in nature than other metals. So their oxides and hydroxides are more basic than second group, similarly as we moving down the group metallic nature of elements increases so their oxides alkaline nature also increses. Oxides and hydroxides of Na are more basic than oxides and hydroxides of Li. Here hydrogen being a rogue element and although it is in 1st group it is not a metal, so its oxide nature is different. Be is is diagonal relationship with Al so its oxides and hydroxides are amphoteric.
hope it helps..