428d851913
* refactor: generic rename to mysql * refactor: g4 with mysql syntax * test: mysql syntax * refactor: remove useless keywords * refactor: remove nonReserved keywords * refactor: lint specificFunction --------- Co-authored-by: liuyi <liuyi@dtstack.com>
19 lines
558 B
SQL
19 lines
558 B
SQL
-- https://dev.mysql.com/doc/refman/8.0/en/create-view.html
|
|
|
|
/* CREATE
|
|
[OR REPLACE]
|
|
[ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]
|
|
[DEFINER = user]
|
|
[SQL SECURITY { DEFINER | INVOKER }]
|
|
VIEW view_name [(column_list)]
|
|
AS select_statement
|
|
[WITH [CASCADED | LOCAL] CHECK OPTION] */
|
|
|
|
|
|
CREATE VIEW test.v AS SELECT * FROM t;
|
|
CREATE VIEW v_today (today) AS SELECT CURRENT_DATE;
|
|
CREATE VIEW v AS SELECT qty, price, qty*price AS value FROM t;
|
|
CREATE VIEW v (mycol) AS SELECT 'abc';
|
|
|
|
CREATE VIEW v AS SELECT * FROM t WHERE t.id = f(t.name);
|