Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save vithalsamp/c6bcfcd7bc5c67e9464fe5ab6e25c9f7 to your computer and use it in GitHub Desktop.

Select an option

Save vithalsamp/c6bcfcd7bc5c67e9464fe5ab6e25c9f7 to your computer and use it in GitHub Desktop.
CREATE EXTERNAL TABLE IF NOT EXISTS stud_like_ext
LIKE stud_int
LOCATION '/data/stud_list';
Query: select * from stud_like_ext
+---------+---------+-------+
| stud_id | dept_id | name |
+---------+---------+-------+
| 101 | 201 | 'AAA' |
| 102 | 202 | 'BBB' |
| 103 | 203 | 'CCC' |
| 104 | 204 | 'DDD' |
| 105 | 201 | 'EEE' |
+---------+---------+-------+
Fetched 6 row(s) in 5.50s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment