【postgresql】基于多个合并UNION (ALL)查询结果创建数据表CREATE TABLE table_name

CREATE TABLE movies.movies_aliyundrive AS
SELECT * FROM movies."电视剧,纪录片"
UNION
SELECT * FROM movies."动漫动画"
UNION
SELECT * FROM movies."教程.课程.软件"
UNION
SELECT * FROM movies."小说.书.图片"
UNION
SELECT * FROM movies."影视音乐"

SELECT * FROM movies.movies_aliyundrive

参考链接

PostgreSQL创建表 - PostgreSQL教程
https://www.yiibai.com/postgresql/postgresql-create-table.html

posted on 2023-01-11 17:44  cxloge  阅读(342)  评论(0编辑  收藏  举报