I would like to add a new column to a table that takes the information from another column and subtracts 10% from that number. The following is what I have so far. I don't know how to complete the trigger statement to set the information from the other row. Additionally, I want to make the default value of the new column pListPrice -10%. Any ideas would be much appreciated! Thanks!
ALTER TABLE products ADD a_price DOUBLE DEFAULT (SELECT pListPrice *.9 FROM products);
CREATE TRIGGER t_products BEFORE UPDATE ON products FOR EACH ROW SET a_price = pListPrice*.9