随机从数据库取一条记录
(1) ACCESS:
SELECT TOP n * FROM [tablename] {WHERE condition} ORDER BY RND(field_name) {ASC/DESC}
(2) SQL SERVER:
SELECT TOP n * FROM [tablename] {WHERE condition} ORDER BY NEWID() {ASC/DESC}
(3) MYSQL:
SELECT * FROM [tablename] ORDER BY RAND() {ASC/DESC} LIMIT n
(4) ORACLE:
SELECT * FROM (SELECT * FROM [tablename] ORDER BY DBMS_RANDOM.VALUE) temp WHERE rownum <= n