Are `AS`'s in `SELECT * FROM mytable AS t` and `CREATE VIEW AS (…)` the same command?

Multi tool use


Are `AS`'s in `SELECT * FROM mytable AS t` and `CREATE VIEW AS (…)` the same command?
In PostgreSQL,
SELECT * FROM mytable AS t;
CREATE VIEW v AS (SELECT * FROM mytable);
In terms of syntax, are AS
's in the above two commands
AS
different clauses of SELECT
command and of CREATE VIEW
command respectively?
SELECT
CREATE VIEW
or the same command themselves?
Thanks.
It's not a "command", it's a keyword that introduces an alias
– a_horse_with_no_name
2 mins ago
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Why you are faced such a question?
– Hamlet Hakobyan
6 mins ago