SQL ( Structured Query Language ) is the relational database query language. the from is followed by the "table name", where the condition is followed by "field in table"
HQL ( Hibernate Query Language ) is an object-oriented query , The from is followed by the table name, where the condition is followed by the field in the table. When you use queries in Hibernate,
Generally use HQL query statements. Because HQL is object-oriented, and the names and properties of object classes are case-sensitive, they are case-sensitive.
JPQL (Java presistence Query Language) is the object query language created by JPA in EJB3.0. JPQL are fully object-oriented, with inheritance, polymorphism, and correlation features,
very similar to hibernate hql. Based on the firstEJB Query Language (EJB QL) introduced in the EJB2.0,Java Persistent Query Language (JPQL) is a portable query language,designed for object-oriented expression language
The expression,binds SQL syntax to simple query semantics. Queries written in this language are portable and can be compiled into SQL on all major database servers.
The JPQL statement supports two ways of defining a parameter: named parameter and positional parameter. Only one parameter definition mode is allowed in the same query statement.
CQL(Cloud query Language) is a subset and variant of the SQL query syntax that Leancloud has customized for the query API to enable developers to use traditional SQL syntax to query
leancloud Cloud data,This reduces the cost of Learning Leancloud query APIs. major differences with SQL:adding aliases to columns with the AS keyword in select is not supported. Update and delete
Bulk updates and deletions are not available, and a document can only be updated or deleted based on objectId ( where objectId=xxx
) and other criteria. not supported join
, correlated queries provided include
, relatedTo
etc.
syntax to replace (relational query). only partial SQL functions (built-in functions) are supported. does not support,,,, group by
having
, and max
min
sum
distinct
so on group aggregation query syntax. transactions are not supported.
locks are not supported.
Comparison of SQL HQL JPQL CQL