我只想用單詞顯示說明ROMEO JULIET即使它不按時間順序排列。使用LIKE即使不按時間順序查找2個單詞
ID DESC
1 This is a sample sentence created by romeo and juliet
2 This is a sample sentence with romeo juliet.
3 romeo and juliet.
4 How to query romeo juliet word.
5 This is not included because there no name here.
在上面的示例中,我想顯示id爲1到4,因爲它包含單詞romeo juliet。
我該如何使用LIKE?
我試圖下面查詢
SELECT DESC FROM TableName WHERE DESC LIKE '%ROMEO JULIET%'
但結果是唯一ID 2中,由於在名稱ID 1,3和4是不按時間順序。
在此先感謝。
嘗試'選擇從DESC WHERE表名DESC LIKE '%羅密歐朱麗葉%%'' – Sachu
時間順序?問題中的時間元素在哪裏? –