Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 567 Bytes

Create-View.md

File metadata and controls

19 lines (14 loc) · 567 Bytes

Keyword CREATE VIEW

Syntax:

    CREATE VIEW viewid [(column, ...)] AS select

AlaSQL supports CREATE VIEW statement:

    alasql('create table city (name string, population number); \
            create view bigcity (name) as select name from city where population > 1000000; \
            insert into city values ("Moscow",11500000), ("Berlin", 3500000), ("Yoshkar-Ola",250000)');

    alasql('insert into city values ("New York",16000000)');

Try this example in jsFiddle

See also: [DROP VIEW](Drop View)