我不知道如何删除属于特定文件的单词。我正在尝试删除属于 fileId 42 文件的单词。有人认为他们可以帮助我吗?
Table file
fileId - Primary Key
fileName - Normal column.
fileUrl - Normal column.
Table fileWord
fileId, wordId - Primary Key, Foreign Key
count - Normal column.
Table word
wordId - Primary Key
word - Normal Column
我的 SQL:
DELETE words
FROM files f, fileword fw, words w
WHERE 42 = fw.fileId AND fw.wordId = w.wordId;