DEV Community

realNameHidden
realNameHidden

Posted on

Native SQL Queries in Hibernate

Native SQL Queries in Hibernate

->these are db s/w specific sql queries.
->if any operation is not possible with hql/jpql queries then we need
to use native sql queries
->these queries based persistence logic is db s/w dependent persistenc logic
->using this queries we can perform insert operation
->support both positional and named param.
->each native sql query is represented by the NativeQuery Object
->to execute the native query use list() method,
similary to execute the native sql non-select query use executeUpdate() method
->these queries goes and execute db s/w directly with minimal conversion
becoz db s/w understand queries i.e these gives good performance.

for detailed explanation you can watch the video:

Top comments (0)