摘要: 分页 页码 号码 每页多少条数据 1 1-3 3 2 4-6 3 7-9 4 10-12 跳过几条取几条?top select top 3*from student where stuno not in ( select top 3 stuno from student order by stuno 阅读全文
posted @ 2017-03-17 16:05 张·小白 阅读(78) 评论(0) 推荐(0) 编辑
摘要: --行转列面试题 select rq sa 日期 , ( casae when shengfu='胜'then 1 else 0 end )as胜, sum ( casae when shengfu='负'then 1 else 0 end )as负, from tmp group by rq -- 阅读全文
posted @ 2017-03-17 11:47 张·小白 阅读(189) 评论(1) 推荐(0) 编辑
摘要: 方法一 示例1变量版 use xuexioa --切换到xuexiao的数据库 declare @no int --声明一个整型局部变量@no select @no=stuNo from student where stuName='张三' --查询出张三的学号赋值给@no select*from 阅读全文
posted @ 2017-03-17 11:36 张·小白 阅读(106) 评论(0) 推荐(0) 编辑