您的当前位置:首页 >应用开发 >SQL Server数据库如何按百分比查询出表中的记录数 正文

SQL Server数据库如何按百分比查询出表中的记录数

时间:2025-11-04 16:42:52 来源:网络整理编辑:应用开发

核心提示

复制createprocedurepro_topPercent ( @ipercent[int]=0--默认不返回 )

SQL Server数据库如何按百分比查询出表中的记录数
据库复制create procedure pro_topPercent    (     @ipercent [int] =0               --默认不返回   )   as   begin   select  top (@ipercent )  percent * from books   end  1.2.3.4.5.6.7.8.