• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

OneToMany关系。如何提出要求?

My database structureOneToMany关系。如何提出要求?

你好。我是SQL中的noob,所以将appriciate,如果你帮我写一个SQL请求获取FINALSCORE字段FROM tennisset表,与tennismatch相关WHERE id = 1

谢谢。


===========解决方案如下:

尝试此查询:

select FINALSCORE from 
tennismatch join 
tennismatch_tennisset on tennismatch.ID = tennismatch_tennisset.TennisMatch_ID and tennismatch.ID = 1 join 
tennisset on tennismatch_tennisset.mapOfSets_ID = tennisset.ID 

从表“tennismatch”删除记录,首先删除子表“tennismatch_tennisset”的记载。

尝试这样:

delete from tennismatch_tennisset where TennisMatch_ID =1 
delete from tennismatch where id=1 

版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)