随笔分类 - 数据库
摘要:之前做的东西数据量都不大,没有太考虑到效率,这次意识到不足想看看大数据如何分页会比较好。 网络上搜索了一下发现大家主要也是评论这两种方式比较好 第一种: select top 10 * from table1 where id not in (select top ((页码-1)*页大小) id from table1 where 条件 order by id) and where 条件 orde...
        阅读全文
            
摘要:去面试时候的一道笔试题目 select * from tbl_user where common_name in (select common_name from tbl_user group by common_name having count(common_name)>1)
        阅读全文
            
 
                    
                
 
 浙公网安备 33010602011771号
浙公网安备 33010602011771号