在beeline中使用hive时使用简单的select查询我想在列名中返回没有表名的表作为默认值.
例
数据
CREATE TABLE IF NOT EXISTS employee ( eid int, name String,
salary String, destination String)
COMMENT 'Employee details'
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\t'
LINES TERMINATED BY '\n'
STORED AS TEXTFILE;
SELECT查询返回:
SELECT * FROM employee;
+---------------+----------------+------------------+-----------------------+--+
| employee.eid | employee.name | employee.salary | employee.destination |
+---------------+----------------+------------------+-----------------------+--+
+---------------+----------------+------------------+-----------------------+--+
期望的结果
使用AS可以获得所需的结果:
SELECT eid AS eid, name AS name, salary AS salary,
destination AS destination FROM employee;
+------+-------+---------+--------------+--+
| eid | name | salary | destination |
+------+-------+---------+--------------+--+
+------+-------+---------+--------------+--+
问题
我希望每次运行select查询时都避免输入AS,并返回没有列名中的表名作为默认行为的结果.