Computer Science/Database

W3Schools SQL | #53 SQL VIEWS 테이블

토마토. 2022. 10. 30. 00:06

SQL Views

SQL Views

결과를 기반으로 하는 가상 테이블

SQL CREATE VIEW Statement

CREATE VIEW view_name AS
SELECT column1, column2, ...
FROM table_name
WHERE condition;

SQL CREATE VIEW Examples

CREATE VIEW [Brazil Customers] AS
SELECT CustomerName, ContactName
FROM Customers
WHERE Country='Brazil';

SQL Updating a View

CREATE OR REPLACE VIEW view_name AS
SELECT column1, column2, ...
FROM table_name
WHERE condition;

SQL Dropping a View

DROP VIEW view_name;