mssql查询
我有张数据表ktv_info 字段分别是id,name(ktv名字),city(城市区号,如591,592)
现在我要怎样能先查出city=592的数据然后查别的数据呢
如 查询结果
name city
厦门莲前东路288号瑞景广场3F 592
福州欢唱 591
补充:select name,city from ktv_info where city='592' union all
select name,city from ktv_info where city<>'592'这样的查询语句在hibernate中怎么表示
答案:select * from ktv_info where city=592 union all
select * from ktv_info where city<>592
其他:select name,city from ktv_info where city='592' union all
select name,city from ktv_info where city<>'592' select * from ktv_info
order by city desc
上一个:原access查询语句换成mssql后怎么写
下一个:mssql查询两张表所有数据