我正在进行一些修订,以下是要做的:
删除属于“A Wilks”的Beetle
person (driver-id, name, address)
car (license, model, year)
accident (report-number, date, location)
owns (driver-id, license)
participated (driver-id, car, report-number, damage-amount)
这是我想到的:
DELETE FROM car
WHERE model = 'beetle'
然而,我知道这是错误的,因为它将删除所有甲壳虫汽车,而不仅仅是A·威尔克斯拥有的那辆。
SELECT
)查询以展示所有车主为'A'
且车型为'beetle'
的汽车吗?如果可以,将该查询语句改为一个DELETE
语句会很容易。 - ypercubeᵀᴹ