close
蠻實用的技巧,紀錄下來..

 Access:

    Select Top N * From Table
    Where condition
    Order By Rnd( 數字型態欄位名稱 )

 MsSQL:

    Select Top N * From Table
    Where condition
    Order By
NEWID()

 MySQL:

    Select * From Table
    Where condition
    Order By
RAND() Limit N


arrow
arrow
    全站熱搜
    創作者介紹
    創作者 chph 的頭像
    chph

    Afutseng's Blog

    chph 發表在 痞客邦 留言(1) 人氣()