跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • 求助: 这个 SQL 查询如何写? 谢谢
未分類
26 10 月 2020

求助: 这个 SQL 查询如何写? 谢谢

求助: 这个 SQL 查询如何写? 谢谢

資深大佬 : sprinter 7

查询输入表 A(单列单词串):

id String

1 As

2 soon

3 as

4 he

5 see

6 teacher

7 ,

8 he

9 say

10 “

11 good

12 morning

13 “

14 !

查询输入表 B(词组字典)

String

as soon as

good morning

as soon as

查询输出表 C(找出哪些行有什么词组)

id String

1 as soon as

2 as soon as

3 as soon as

11 good morning

12 good morning

请教各位,

请参阅上述 2 个表格: 我需要在单列单词串中找出词组(词组长度不一, 一般为 2~10 个单词). SQL 查询基于 A,B 表, 查询需输出 C 表, 这个 SQL 该如何写? 多谢指教!!

大佬有話說 (1)

  • 資深大佬 : gaobing

    select a.id, b.string from a join b on b.string like concat(a.string,’ %’) or b.string like concat(‘% ‘,a.string) or b.string like concat(‘% ‘,a.string,’ %’)

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具