首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

sql精确查询解决办法

2012-03-09 
sql精确查询表Product,有字段Status 值为0,或1,有字段Time现要查出所有数据,并且Status1的数据优先显示,

sql精确查询
表Product,有字段Status 值为0,或1,有字段Time
现要查出所有数据,并且Status=1的数据优先显示,而且要按照Time排序,各位高手, 帮帮忙啦,纠结的很啊

[解决办法]
select *
from tb
order by Status desc ,Time
--?
[解决办法]

SQL code
select * from product order by status desc,[time]
[解决办法]
SQL code
select * from Product order by Status desc, Time 

热点排行
Bad Request.