INNER JOIN or JOIN returns rows meeting the join conditions from both sides of joined tables. The JOIN keyword can also be omitted by comma-separated table names; this is called an implicit join. Here are examples of the HQL JOIN operation:
- First, prepare a table to join with and load data to it:
> CREATE TABLE IF NOT EXISTS employee_hr ( > name string, > employee_id int, > sin_number string, > start_date date > ) > ROW FORMAT DELIMITED > FIELDS TERMINATED BY '|'; No rows affected (1.732 seconds) > LOAD DATA INPATH '/tmp/hivedemo/data/employee_hr.txt' > OVERWRITE INTO TABLE employee_hr; No rows affected (0.635 seconds)
- Perform an INNER JOIN between two tables with equal and unequal join conditions, along with complex expressions ...