select该如何写? select * from table where f1>=3 order by f1union select * from table where f1 in (1,2) order by f1 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from tbname order by decode(f1,1,99999998,2,99999999,f1); select * from table where f1>2 order by f1union select * from table where f1<3 order by f1 select * from table where f1>2 order by f1union select * from table where f1<3 order by f1不行,报错。ORA-00933 SQL command not properly ended 用这个可以,不过就是有点缺陷select * from tbname order by decode(f1,1,99999998,2,99999999,f1);不知道表里的f1值会不会超过指定的数99999999 ORDER BY不能这么用。只能在UNION后用一次。如:select * from table where f1>2 union select * from table where f1<3 order by 1 怕F1超过99999999的,可以这样:select * from tbname order by decode(f1,1,'a',2,'b',f1); 谢谢各位,另外,sybase有类似的decode的函数吗? 启动数据库时提示 requested INSTANCE_NUMBER is busy oracle中非自然月的问题 如何向oracle数据库中插入整型变量 oracle9客户端能不能导出oracle11数据? 在oracle中,创建的过程带有编译错误,这是什么原因 提问:Oracle10g基于时间恢复 数据库安全问题 如何修改数据文件路径和改名? 一个很简单的问题 Oracle到底用了多少端口? 关于VC下通过OCI连接ORCALE的一个问题 列表中具有指定参数的多个例程
union
select * from table where f1<3 order by f1
union
select * from table where f1<3 order by f1
不行,报错。ORA-00933 SQL command not properly ended
select * from tbname order by decode(f1,1,99999998,2,99999999,f1);
不知道表里的f1值会不会超过指定的数99999999
只能在UNION后用一次。
如:
select * from table where f1>2
union
select * from table where f1<3 order by 1
select * from tbname order by decode(f1,1,'a',2,'b',f1);