EXHIBIT 23.2 CONSENT OF COUNSEL We have examined the Registration Statement on Form S-8 to be filed with the Securities and Exchange Commission on or about March 21, 2002 (the "Registration Statement") in connection with the registration under the Securities Act of 1933, as amended, of the Sanmina-SCI Corporation 401(k) Plan (as to 15,250,000 shares)(the "Plan" and the "Shares" as appropriate). As legal counsel for Sanmina-SCI Corporation we have examined the proceedings taken and are familiar with the proceedings proposed to be taken in connection with the sale and issuance of the Shares pursuant to the Plan. It is our opinion that the Shares, when issued and sold in the manner described in the Plan, will be legally and validly issued, fully paid and non assessable. We consent to the use of this opinion as an exhibit to said Registration Statement and further consent to the use of our name wherever appearing in said Registration Statement and any amendments thereto. Wilson Sonsini Goodrich & Rosati Professional Corporation By /s/ ---------------------------------- Palo Alto, California March 19, 2002