现有表src_table如下:
目标表dest_table如下:
通过UNPIVOT实现如下:
SELECT *
FROM src_table
UNPIVOT (param_value FOR param_name IN (product_color AS 'product_color', product_type AS 'product_type', is_intelligent AS 'is_intelligent');
现有表src_table如下:
目标表dest_table如下:
通过UNPIVOT实现如下:
SELECT *
FROM src_table
UNPIVOT (param_value FOR param_name IN (product_color AS 'product_color', product_type AS 'product_type', is_intelligent AS 'is_intelligent');