不同數據庫有不同的函數進行取值
(1) SQL SERVER TOP函數
Select top(10) from student;---取student表10行數據
Select top 10 precent from student;---取student 表10%的數據
(2) ORACLE rownum函數
Select * from student where rownum<=10; --取student表10行數據
Select * from student where rownum<=(select count(*)*0.1 from student) ;
---取student 表10%的數據
(3) MY SQL limit 函數
Select * from student limit 10; --取student表10行數據
Select * from student limit round(n*0.1) ---取student 表10%的數據