This paper investigates the productivity effect of trade by focusing on various types of trades. Aside from trade volume, the trade heterogeneity we consider includes variety, destination, unit price, and trade type. Based on within-firm-product panel data on China's electronics industry, we confirm a productivity gain from export when firms trade with developed countries, undertake process trade, and have a higher unit price, but not for firms exporting a greater variety of goods. These heterogeneities in imports also matter to promoting productivity. Moreover, the productivity-enhancing effect of trade varies between domestic and foreign firms, whereby domestic firms benefit more from international trade.