Three California cities -- San Francisco, San Jose and Los Angeles--had the highest median sales prices for existing homes sold during the second quarter of 1983, according to a recent survey by the National Association of Realtors.

San Francisco topped the list of 31 metropolitan areas with a median single-family-home resale price of $128,600 during the three months.

Detroit, at $48,300, had the lowest median existing-home sales price. Other cities near the low end of the spectrum were Albany, N.Y., and Providence, R.I.

The survey showed that the median sales price of existing single-family homes in metropolitan Washington was $89,700 in the second quarter, up 1 1/2 percent from the same period of 1982.

For the nation as a whole, the median existing single-family-home price during April, May and June was $70,100, according to the survey. Prices of existing homes nationwide were 2.9 percent higher in the second quarter than in the same period of 1982.

"Nationwide, home prices through the second quarter increased at a slower pace than the overall inflation rate," said Jack Carlson, the association's chief economist and executive vice president. He predicted that existing-home prices are likely to rise over the next 12 months at the overall rate of inflation or at a slightly lower rate.

Among the survey's other findings:

* Resale prices in metropolitan San Antonio were up 19.1 percent over the year, for the largest annual jump. But San Antonio's median resale home price of $68,600 was closest to the nationwide figure during the second quarter.

* The metropolitan areas of New York, Providence, R.I., and Rochester, N.Y., also recorded double-digit increases in median existing-home prices.