SQL多項條件包含查詢問題,求助

2023-01-19 11:25:20 字數 615 閱讀 5391

1樓:匿名使用者

select * from 員工 where skill like '%印刷%' and skill like '%fqc%'

不過這樣效率可能不高。

應該是對於每個人來說,1個技能一行,然後就好處理了。

2樓:

select yuangong from yourtable where concat(',',gwskill,',') like ('%,印刷,%') and concat(',',gwskill,',') like ('%,fqc,%');

其中concat(',',gwskill,',') like ('%,印刷,%')應該是在你的軟體中拼出來的

3樓:匿名使用者

like 模糊查詢 %任意字元 _代表任意一個字元where name1 like '李%' 姓李where name1 like '_視%' 第二個字是視where name1 like '%a%' 含有a字母

4樓:匿名使用者

其實你這個表設計得不好,按你這樣,應該一個技能就一個欄位列,方便以後的資料處理。

Sql關聯查詢問題,mysql 關聯查詢求助

沒測試過 應該沒什麼大問題。select sum chngrade sum enggrade sum matgrade from select chngrade,0 enggrade,0 matgrade from a,b where and 語文 unionselect 0,0 from a,bw...

sql查詢問題

你這問題好模糊,連表欄位都沒有給出,給你大概寫下,select 訪問人 from 表 where convert varchar 7 日期欄位,120 2014 04 有問題再追問吧 select convert varchar 7 date,23 as date,count from testip...

sql查詢問題

mysql select from a id b num 1 b1 200 2 b1 300 3 b1 400 4 b2 120 5 b2 920 5 rows in set 0.00 sec mysql select b,sum num from a group by b b sum num b1...