我有一個MySql數據庫。 我的主表是一系列5本書的所有句子,書的索引,書的章節,章節的句子。MySql - 獲取所有發生的內容
示例 - 對於哈利波特第五冊第一章第三句,我會有這樣的一排。
BookID ChapterID SentenceID Text
4 1 3 Deprived of their usual car-washing and lawn-mowing pursuits, the inhabitants of Privet Drive had retreated into the shade of their cool houses, windows thrown wide in the hope of tempting in a nonexistent breeze.
我需要檢索所有發生的字母或單詞。 因此,如果我搜索'e',我會得到同一行17次。 'e'出現在這一行17次。
我簡化了場景,我有更多的信息來檢索每個字母。
到目前爲止,我一直無法得到一些有用的東西。
謝謝
分享你的sql。 –