How to Multiply Columns in SQL

SQL databases support all standard mathematical operations, including the ability to multiply data from one column with data from a second column or field. The only requirement for multiplication between columns of data in an SQL table is that both fields involved must contain integers or decimals. When you write a select statement to perform the multiplication between columns, the database stores the results of the operation in a separate field.

Create a new SQL statement in your database application.

Type "SELECT (Column 1 * Column 2)" and replace "Column1" and "Column2" with the names of the fields or columns you want to multiply.

Add "AS (Newfield)" to your SQL statement and replace the word "NewField" with the name you want to use for the new column where the results of the multiplication will be stored.

Complete the SQL statement by typing "FROM (TableName);" and replacing "TableName" with the name of the database table the contains the columns you are using.

Run the SQL statement to perform the multiplication for each record in the table and place the results in the new field you defined in Step 3.

Cite this Article A tool to create a citation to reference this article Cite this Article

About the Author

Bennett Gavrish is an I.T. professional who has been writing about computers, electronics and the Web since 2004. His work has appeared in the "Nashua Telegraph" and the "Daily Free Press" and on numerous websites. Gavrish received a bachelor's degree in journalism from Boston University.