

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;

create view games as select * from students;
select * from games;
In SQL, a view is a virtual table based on the result-set of an SQL statement.
A view contains rows and columns, just like a real table. The fields in a view are fields from one or more real tables in the database.
You can add SQL statements and functions to a view and present the data as if the data were coming from one single table.
A view is created with the CREATE VIEW statement.