更新带有同一ID -MySQL的最后记录字段的NULL字段
我需要使用先前记录的卖方更新Colucm“ seller_name”下的空字段 具有相同“ product_id”字段的名称。例如,下表:
product_id | iyro |
---|---|
IG | mpiysusu |
2152514625 | iyro |
ig | 2185564723 |
OTI | 1178042531 |
</ | 2152514625 |
强> | 2185564723 |
strong | seller_name |
1330811490 | |
ioku | null |
TSUG | 595898812 |
TSUG | 595898812 |
null | : |
Product_id
iyro | IG |
---|---|
2185564723 | 2152514625 |
2152514625 | |
为 | 最终 |
输出 | 1178042531 |
mpiysusu | Seller_name |
mpiysusuyi | |
应 | 2152514625 |
mpiysusuyi | 2152514625 |
ioku | 1330811490 |
tsug | 595898812 |
tsug | 595898812 |
oti oti oti | 1178042531 |
我是新的解释。
I need to UPDATE null fields under the colucm "seller_name" with previously recorded seller
names that have the same "Product_ID" field. For example given the following table:
seller_name | Product_ID |
---|---|
iYRO ig | 2185564723 |
Mpiysusu | 2152514625 |
iYRO ig | 2185564723 |
oti | 1178042531 |
NULL | 2152514625 |
NULL | 2152514625 |
Mpiysusuyi | 2152514625 |
NULL | 2152514625 |
ioKU | 1330811490 |
Tsug | 595898812 |
Tsug | 595898812 |
NULL | 1178042531 |
The final output should be:
seller_name | Product_ID |
---|---|
iYRO ig | 2185564723 |
Mpiysusu | 2152514625 |
iYRO ig | 2185564723 |
oti | 1178042531 |
Mpiysusu | 2152514625 |
Mpiysusu | 2152514625 |
Mpiysusuyi | 2152514625 |
Mpiysusuyi | 2152514625 |
ioKU | 1330811490 |
Tsug | 595898812 |
Tsug | 595898812 |
oti | 1178042531 |
I'm new into SQL so any explanation would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道其他值来自何处,但是如果您只想使用零值更新列,则可以尝试执行此操作。
I don't know where the other values came from but if you just want to update the column with the null values you can try to do this.