CREATE view view_name WITH  aa(col1) AS ( SELECT 1 UNION ALL SELECT 2 ) SELECT col1 FROM cte