首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Informix >

informix中怎么实现sql语句中将'bat' union 到select type from t_type

2012-12-30 
informix中如何实现sql语句中将➺t' union 到select type from t_type?informix中如何实现sql

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 

不效率比较差。

不如直接在程序中实现。

热点排行