学习时间:
2023年2月3日
题目描述:


题解分享:
# 作 者 : 繁 华 倾 夏
# 力扣(LeetCode):1795. 每个产品在不同商店的价格
# MySQL 数据库
SELECT product_id, 'store1' store, store1 price FROM products WHERE store1 IS NOT NULL
UNION
SELECT product_id, 'store2' store, store2 price FROM products WHERE store2 IS NOT NULL
UNION
SELECT product_id, 'store3' store, store3 price FROM products WHERE store3 IS NOT NULL;
244



被折叠的 条评论
为什么被折叠?



