我有以下查询:
SELECT product_description.name, product.quantity,product.price,product_option_value_description.name,product_option_value.quantity FROM product INNER JOIN product_description ON product.product_id=product_description.product_id INNER JOIN product_option_value_description ON product.product_id=product_option_value_description.product_id INNER JOIN product_option_value ON product.product_id=product_option_value.product_id ORDER BY product_description.name
product_option_value_description.name我想为该选项命名时如何更改标题。
product_option_value_description.name
使用这样的别名:
product_option_value_description.name AS `Option`
如果要更改列名,则不仅要为此查询使用,而且通常要使用ALTER TABLE
ALTER TABLE product_option_value_description CHANGE name newname DATATYPE;