读书人

informix中怎么实现sql语句中将amp;#x27;

发布时间: 2012-12-30 10:43:15 作者: rapoo

informix中如何实现sql语句中将'bat' union 到select type from t_type?
informix中如何实现sql语句中将'bat' union 到select type from t_log?
尝试使用
select first 1 'bat' from t_log
union all
select distinct type from t_log

但报错

而oracle中能很容易的实现:
select 'bat' from dual
union all
select distinct type from t_log
[解决办法]
呵呵,自己解决更好
[解决办法]
select distinct 'bat' from t_log
union all
select distinct type from t_log

不效率比较差。

不如直接在程序中实现。

读书人网 >Informix

热点推荐