Création d'une vue SQL
CREATE VIEW view_name AS
SELECT column1, column2.....
FROM table_name
WHERE [condition];
SiyaTheKing
CREATE VIEW view_name AS
SELECT column1, column2.....
FROM table_name
WHERE [condition];
CREATE VIEW us_customers AS
SELECT customer_id, first_name
FROM Customers
WHERE Country = 'USA';
-- SELECT * FROM view_name
CREATE OR REPLACE VIEW view_name
AS
SELECT column1, column2, column3, ..
FROM table_name
WHERE [condition];
create or replace view active_toys as
select * from toys
where is_deleted = 'N';
select * from active_toys;