[最优解释] order by case when id=20 then 0 else 1 end,id [其他解释] declare @参数 nvarchar(20) exec ('select * from product where classid='+@参数+' order by case when classid='+@参数+' then 0 else 1 end,classid')
[其他解释] order by case when id=20 then 1 else 2 end,id
[其他解释]
你要显示两次ID=20的数据? [其他解释] 如果你指定是20在第一行,那就: select * from xxx where id=20 union all select * from xxx
[其他解释]
"select * from product where classid="&classid&" order by case when classid="&classid&" then 0 else 1 end,classid"
我这样写的对吗 输出没结果
[其他解释]
我这样写的对吗? 输出没结果
"select * from product where classid="&classid&" order by case when classid="&classid&" then 0 else 1 end,classid"
[其他解释]
ASP开发 我按照你写的也是没有输出。可能是我太笨了
<% classid = request("classid") set rsx=server.createobject("adodb.recordset") sqlx="select * from product where classid='&classid&' order by case when classid='&classid&' then 0 else 1 end,classid" rsx.open sqlx,conn,1,1 if not rsx.eof then %>
[其他解释]
我是ASP语言 我写的对吗,没有输出
<% classid = request("classid") set rsx=server.createobject("adodb.recordset") sqlx="select * from product where classid="&classid&" order by case when classid="&classid&" then 1 else 2 end,classid" rsx.open sqlx,conn,1,1 if not rsx.eof then %>