Walter Davis, a six-time All-Star and the leading scorer in Phoenix Suns history, became the second unrestricted free agent to change teams when he signed yesterday with the Denver Nuggets.

''The contract I signed is for two years,'' said the 33-year-old Davis, who had said that he would retire after next season. ''That's what I want to play. At that time, I had back problems. My back feels great now.''

The Suns had reportedly offered Davis a one-year contract for $450,000, half of his salary last season. The terms of his pact with the Nuggets were not disclosed.

Davis, a 6-foot-6-inch guard, signed with the Nuggets one day after Tom Chambers, a forward, signed with the Suns after playing with Seattle for five seasons.

Davis has been in rehabilitation clinics twice for cocaine abuse.

Asked about drug problems, Davis said: ''I can only speak of the present. I have 15 months of sobriety. I think that's pretty powerful. It means a lot to me.''(AP)