易截截图软件、单文件、免安装、纯绿色、仅160KB

求一SQL语句。

Fuid分别为7,8,9,10,11...

select * from productt where jibie=0  order by fuid asc

但fuid为8的纪录要排在顶部。 怎么写?
select * from productt where jibie=0  order by fuid desc

sorry

SQL code:
select
*
from
productt
where
jibie=0
order by
case fuid when 8 then 0 else 1 end asc


引用
SQL codeselect*from
  producttwhere
  jibie=0orderbycase fuidwhen8then0else1endasc
up

是AC数据库。。

报错了

ACCESS 只能帮顶了

谢谢大家,呵呵。

select  * , iif(fuid=8,0,fuid) as ofuid  from
productt

where
  jibie=0  order by
ofuid
试试看

SQL code:
select *
from productt
where jibie=0
order by iif(fuid=8,0,fuid)




select * from productt
where jibie=0 fuid in (8,select fuid from productt where fuid <> 8)  order by fuid asc



select * from productt
where jibie=0 and fuid in (8,select fuid from productt where fuid <> 8)  order by fuid asc

晕, 少了个 and



相关问答:

门外汉求助...关于后台+SQL+ASP

....接到一个小程序..工作原来大概是这样的...前台是WEB服务器.架构就是ASP+SQL..前台由ASP向SQL添加服务类别(表单).然后又后台程序读取表单..要实时读取..然后显示在服务器上面..从理论上面能行通不?如果可以..后台 ......

关于group by的sql语句?

  with adod_dict do
    begin
    close;
    commandtext:='select bgqxcode,count(*) wjsl from wscl_wsda_file where wjnd=:tnd group by bgqxcode'; ......

总会碰到怪的问题,sql问题

sql2005
select *from v_ddxx where d_sfsc='0' and (g_ssbm='1001' or g_ssbm='1002') and (xxf>0 and  xxfwzf <>0 ),执行速度慢的要死,但是如果把(xxf>0 and  ......

SQL语句效率问题 - 其他数据库开发 / 其他数据库

大家帮忙看看这2个sql语句哪个查询的速度更快点。谢谢帮忙。比较着急。在做性能测试。
select * from
  表A LEFT OUTER JOIN 表B ON (表A.id || ' ' =表B.id) ,表C , 表D, 表E
Where其他条件
select * ......

C#如何判断连接sql server数据库成功?

C#如何判断连接sql server数据库成功?
try
{
connection.connect()
return true;
}
catch()
{
return false;
}

楼主很着急,开了几贴了。

引用
try
{
connection.connect( ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号