0
SELECT ProductID, ProductDescription, ProductUnitsOnHand, ProductUnitPrice
FROM tblProduct
ALTER tblProduct 
ADD COLUMN Reduced Price NUMBER DEFAULT 0

This is what I have been able to figure out so far.

Charles
  • 50,943
  • 13
  • 104
  • 142

1 Answers1

1

Are you trying to add a permanent column to an existing table, or just output an additional column with your results? I'm going to guess the latter. If I'm right, then try this:

SELECT ProductID, ProductDescription, ProductUnitsOnHand,
       ProductUnitPrice, (ProductUnitPrice * .9) as [Reduced Price]
FROM tblProduct
David
  • 4,665
  • 4
  • 34
  • 60
  • You are correct thanks a lot. Also, how can I make only display 2 decimal places? – user3508824 Apr 08 '14 at 21:16
  • Using this page: http://stackoverflow.com/questions/441600/write-a-number-with-two-decimal-places-sql-server `SELECT CONVERT(DECIMAL(10,2),(ProductUnitPrice * .9)) as [Reduced Price]` – David Apr 08 '14 at 21:20
  • 1
    Convert decimal will not work in MS Access see http://stackoverflow.com/questions/11630905/rounding-in-access/11630940#11630940 instead – Fionnuala Apr 08 '14 at 22:19