Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我尝试从 SQL 开发人员执行以下查询时,我得到了适当的结果,就像我尝试从休眠中执行相同的查询一样,它返回一个字符对象,只有 D 作为输出。
选择“数据”作为双重信息
在通过休眠执行时,我应该在查询中进行哪些修改以获取信息“数据”。
String queryStr = "SELECT 'Data' as info from dual"; Query qry = session.createSQLQuery(queryStr); qry.list();