The Alexandria school board last night became the second in Northern Virginia in recent weeks to approve a major change in its approach to sex education, voting unanimously and without public dissent to allow classroom discussion of homosexuality, contraception, abortion, rape and masturbation.

The "Fairfax Five," so called by some board members in reference to the stormy debate over the topics in the neighboring county, will be included in a mandatory sex education course scheduled to begin in the fall of 1982. Initially, the course will be taught at the eighth-grade level; it will be extended through all grades over the next six years. Only students whose parents specifically request exclusion from the course will be granted an exemption.

The swift and virtually eventless approval of the course was unlike the process in Fairfax County, whose school board last month ended five years of vituperative public debate when it approved a sex education program.

In contrast, Alexandria last night approved a similar program after only one public hearing and less than two years of discussion -- all but the last two months of it conducted on the committee level.

The difference, board member Lou Cook said in an interview before the vote, was in the approach. "Fairfax fiddled around too long with endless series of meetings and debates. They allowed themselves to be vulnerable to the Moral Majority types -- and were almost overpowered by them," Cook said.

"We [the Alexandria school board] allowed the family life committee and the PTAs to do a lot of the groundwork, so by the time we arrived at a vote the community support was already there."

No specific outline of the course is ready; last night's vote directs the school staff to start planning a curriculum and training teachers. In addition to the "Big Five," the study approved by the board recommends including, among other issues, discussion of child rearing, the integrity of the family, divorce and how to make responsible choices about sexual activity.