In this paper, the maximum sum rate of a multi-code CDMA system is derived, given constraints on the average power and the number of multi-codes of each user. Unlike the sum-rate maximization for a single-code CDMA system, the optimization requires the optimal distribution of each user's power to its multiple data streams. The crucial step is to establish an equivalence of the multi-code CDMA system to restricted FDMA and TDMA systems. The CDMA system has upper limits on the numbers of multi-codes of users, while the FDMA and the TDMA systems have upper limits on the bandwidths and the duty cycles of users. The equivalence facilitates the complete characterization of the maximum sum rate of the multi-code CDMA system and provides new insights into the CDMA, the FDMA, and the TDMA systems.