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.
我想使用 HQL 获取表的列名并将其填充到列表中?..请指导。我正在使用 IBM DB2 数据库。
我没有测试过,但是您可以查询 DB2 目录以获取元数据。如果您在 HQL 中执行等效项,它应该可以工作
select colname from syscat.columns where tabschema like 'MYSCHEMA%' and tabname = 'MYTABLE' order by colno