CREATE VIEW
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
CREATE TABLE TestTable
(
ID INT,
NAME VARCHAR(10)
);
Insert into TestTable Values(1,'MARCO');
Insert into TestTable Values(2,'ESTEBAN');
Insert into TestTable Values(3,'JEFF');
Insert into TestTable Values(4,'OLIVER');CREATE TABLE PUBLIC.TestTable
(
ID INT,
NAME VARCHAR(10)
);
Insert into TestTable Values(1,'MARCO');
Insert into TestTable Values(2,'ESTEBAN');
Insert into TestTable Values(3,'JEFF');
Insert into TestTable Values(4,'OLIVER');CREATE VIEW ViewTest AS SELECT * FROM TestTable WHERE ID > 2;
Select * from ViewTest;CREATE VIEW PUBLIC.ViewTest
AS SELECT * FROM TestTable WHERE ID > 2;
Select * from ViewTest;CREATE VIEW ViewTest2 AS WITH TableAlias As (Select * from TestTable where ID < 3) Select * from TableAlias;
Select * from ViewTest2;CREATE VIEW PUBLIC.ViewTest2
AS WITH TableAlias As (Select * from TestTable where ID < 3) Select * from TableAlias;
Select * from ViewTest2;