Home > Database > Mysql Tutorial > mysql两张表关联设置里面的内容

mysql两张表关联设置里面的内容

WBOY
Release: 2016-06-06 09:40:14
Original
870 people have browsed it

mysqlsql

已经第一张表goods 主键goods_id,价格price,另一张表product 有外键goods_id,价格price。现在要求如果product中的price=0,那么设置这个price的值等于goods表中的price,求这条sql怎么写,谢谢大家

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template