为什么当我对Oracle_db和mysql_db运行相同的查询时得到不同的输出。
a = Activity.find_by_sql("select 'dummy' as dummy from activity limit 1" )
irb(main):003:0> a.first.attributes
=> {"dummy"=>#<BigDecimal:5589f0036ce8,'0.0',9(9)>, "id"=>nil}'
oracle
a = Activity.find_by_sql("select 'dummy' as dummy from activity where rownum <=1" )
irb(main):005:0> a.first.attributes
=> {"dummy"=>"dummy", "id"=>nil}
我尝试了几件事,但无法得出结论。 有人可以帮我吗?