Showing posts with label hive create table as; hive create table. Show all posts
Showing posts with label hive create table as; hive create table. Show all posts

Wednesday, September 30, 2020

Creating a table and a view with the select statement.

In this article, you'll learn how to create a view and table based on a select statement.


-~ To create a view

CREATE VIEW Emp_View 
AS
SELECT Ename, DName FROM Emp
INNER JOIN Dept ON Emp.DeptNo = Dept.DeptNo;


-~ To create a table

CREATE TABLE EmpDept 
AS 
SELECT Ename, DName FROM Emp
INNER JOIN Dept ON Emp.DeptNo = Dept.DeptNo;


Can we create a table based on a view? Click here.


Big Data & SQL

Hi Everybody, Please do visit my new blog that has much more information about Big Data and SQL. The site covers big data and almost all the...