Re: [SQL ] data mining
嗯 用子查詢好了
select id, key_index,
(select count(*) from content where word like '%' + key_index + '%') as col1
from key_data
嗯 如果要用inner join...
select t1.id, t1.key_index, count(*) as col1
from key_data t1
inner join content t2 on t2.word like '%' + t1.key_index + '%'
group by t1.id, t1.key_index
不過我是在sql server 2000上試的= = 我沒有mysql
希望有幫到忙XD
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 118.231.55.87
※ 編輯: pennymarkfox 來自: 118.231.55.87 (05/23 14:05)
推
05/23 14:20, , 1F
05/23 14:20, 1F
討論串 (同標題文章)