看板 Database 關於我們 聯絡資訊
※ 引述《tn801534 ()》之銘言: : ACCESS好像不接受 : count(distinct 姓名) 這樣的語法 distinct 放在 count 裡面? 你是想要這個嗎? select count(*) from table group by 姓名 還是這個? select count(*) from ( select distinct 姓名 from table ) as table2 : 還有 : select 公司,distinct 產品 : from table : group by 公司 : 這個好像也不能接受 : 他distinct好像只能直接在select後面 看不懂你希望他輸出什麼… group by 公司的話,一間公司就只有一筆資料 產品是不是 distinct 根本沒意義 不知道的你想要的是不是這個? select 公司, 產品 from table group by 公司, 產品 : 還有要限制輸出幾筆的limit : 像 : select * : from table : limit 5 : 這些語法在access要怎麼實作呢? 好像有這樣的語法… select top 5 from table -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 134.208.33.185 ※ 編輯: bcse 來自: 134.208.33.185 (11/04 08:43)