数据库一些小知识

刚参加工作不久  记录一些小知识

ordere by  默认升序排序

asc是指定列按升序排列  从小到大排序

desc则是指定列按降序排列  从大到小排序

select * from a
where   
order by  

order by 在where后面 where先执行过滤后的数据 在order by 

select top 50 percent * from 表名  表示查询数据的百分之50 (top 50 percent)

 

posted @ 2017-07-18 17:43  醉酒饮天下  阅读(119)  评论(0编辑  收藏  举报