Example I have Oracle table with CHAR and NUMBER fields. ID NUMBER(1) PASSWORD CHAR(3) NAME VARCHAR2(4)
and data is ID PASSWORD NAME 1 passwd test
When I execute following query by using hibernateTemplate.execute
"select id, password, name from test_table"
my return is "null" "null" "test" If I edit query like this "select trim(id), trim(password), trim(name) from test_table" This returns correct result "1" "passwd" "test"
question is why CHAR and NUMBER fields returns NULL without trim?
One more question is when I execute following query "select * from test_table" can I get all columns name (means column metadata)?
|