Contracts for two nuclear-powered aircraft carriers helped propel Virginia into second place in Pentagon spending by state last year, but it still lagged far behind the perennial leader, California.

Bucking a trend of "procurement decrease" in 32 states in fiscal 1988, the value of contracts awarded in Virginia rose 31 percent, the Defense Department said in a report released Wednesday.Virginia contractors won $10.2 billion in awards, up from $7.8 billion in fiscal 1978, when the state finished fifth. Part of the Virginia increase came from contracts the Newport News Shipbuilding & Drydock Co. received for two nuclear-powered aircraft carriers.

California contractors won $23.5 billion in awards, down 4.3 percent from the fiscal 1987 total of $24.5 billion. California is the home of many large aerospace, computer and electronic concerns that work on military weapon projects.

Mississippi reported the biggest improvement, a 64.3 percent jump from $1.5 billion to $2.4 billion.

The information on defense spending trends was contained in a statistical report entitled "Prime Contract Awards by State." The latest Defense Department report covers fiscal 1988, the 12-month period that ended Sept. 30.

Eighteen states plus the District of Columbia reported gains, most of them small.

Altogether, the Defense Department, the armed services and the Army Corps of Engineers awarded contracts totaling $142.15 billion for work in the United States in fiscal 1988, compared to $147.15 billion in fiscal 1987 and $149.3 billion in fiscal 1986.

For 1988, the Top 10 list showed Texas in third place with contracts totaling $9 billion, followed by New York with $7.7 billion, Massachusetts with $7.2 billion, Missouri with $5.5 billion, Florida with $5.3 billion, Ohio with $5.1 billion, Connecticut with $4.9 billion and Maryland with $4.3 billion.