문제

When I run a query like this in oracle 10g using sqldeveloper, it runs fine.

select 'Canada' as "country", emp.name as "name" from emp.

Gives me the name and country. When I run it in hibernate as a named query, I get only 'C' instead of 'Canada' for "country".

Why is this so?

도움이 되었습니까?

해결책

select cast('Canada' as varchar2(100)) as "country", emp.name as "name" from emp.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top