Untitled

Untitled

CREATE TABLE customers ( id INTEGER PRIMARY KEY, FirstName TEXT NOT NULL, LastName TEXT NOT NULL, PhoneNumber TEXT NOT NULL, Extension TEXT

); -- insert some values INSERT INTO customers VALUES (1, 'Hxxx', 'Rxx', '1', NULL); INSERT INTO customers VALUES (2, 'Lxx', 'Fxxx', '2', NULL); INSERT INTO customers VALUES (3, 'Micxx', 'Sax', '3', '12'); INSERT INTO customers VALUES (4, 'Minxxx', 'H..', '4', '77'); INSERT INTO customers VALUES (5, 'Sxx', 'Stxxx', '5', NULL); -- fetch some values --SELECT * FROM customers; --SELECT * FROM customers where Extension is not NULL; SELECT * FROM customers where Extension is not NULL order by LastName;

Untitled

create view: SQL online實作練習

create view games as --SELECT * FROM students;

SELECT * FROM students order by name;

select * from games;

SQL VIEW 檢視表 / 視圖 - SQL 語法教學 Tutorial

What language is the view? DDL, DCL or DML?

SQL CREATE VIEW, REPLACE VIEW, DROP VIEW Statements

SQL CREATE VIEW Statement

In SQL, a view is a virtual table based on the result-set of an SQL statement.