Query for executing a native SQL query.">
Jakarta Persistence (JPA) Method

Query createNativeQuery(
  String sqlString,
  Class<T> resultClass
)


Create an instance of Query for executing a native SQL query.

In the next release of this API, the return type of this method will change to TypedQuery.

Parameters:
sqlString - a native SQL query string
resultClass - the type of the query result
Returns:
the new query instance.
Since:
Jakarta Persistence (JPA) 1.0