From is the simplest hql statement and the most basic hql statement. The from keyword is followed by the class name of the persistence class. For example:From personAll instances are selected from the person persistence class. In most cases, we recommend that you create an alias for each instance of this person. For example:
From person as PHere, the alias of an instance in the person persistence class is P. When naming an alias, The as keyword is optional, but it is recommended to keep it for readability.
Multiple persistence classes can also appear after the from clause. At this time, a Cartesian Product or cross-table join is generated. However, in fact, this method is rarely used, because when we may need to use cross-Table connections, we can consider using implicit connections or explicit connections, rather than directly following the from followed by multiple table names.