看板 Database 關於我們 聯絡資訊
先謝過bc大大 ※ 引述《bcse (Lvx ex Caelis)》之銘言: : ※ 引述《tn801534 ()》之銘言: : : ACCESS好像不接受 : : count(distinct 姓名) 這樣的語法 : distinct 放在 count 裡面? : 你是想要這個嗎? : select count(*) from table group by 姓名 : 還是這個? : select count(*) : from ( : select distinct 姓名 : from table : ) as table2 : : 還有 喔喔原來可以這樣用瞭了 select 公司,count(distinct 產品) from table group by 公司 這段之前打錯OTZ : : 這個好像也不能接受 : : 他distinct好像只能直接在select後面 : 看不懂你希望他輸出什麼… : group by 公司的話,一間公司就只有一筆資料 : 產品是不是 distinct 根本沒意義 : 不知道的你想要的是不是這個? : select 公司, 產品 : from table : group by 公司, 產品 : : 還有要限制輸出幾筆的limit : : 像 : : select * : : from table : : limit 5 : : 這些語法在access要怎麼實作呢? : 好像有這樣的語法… select top 5 * from table top語法我在說明文件找到了 原來如此 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.211.217.211 ※ 編輯: tn801534 來自: 218.211.217.211 (11/04 09:30) ※ 編輯: tn801534 來自: 218.211.217.211 (11/04 09:30)