sql - 如何使用 Azure Data Studio 在 postgresql 中处理临时表?
问题描述
我在 Azure 中使用 Postgresql 数据库,但是当我使用临时表时,会出现一个错误,指出它是不允许的。
示例代码是:
select * into temptable from act_hi_taskinst
错误是:
SELECT ... INTO is not allowed here
我也尝试了链接https://www.postgresqltutorial.com/postgresql-select-into上的通知,但我仍然有同样的错误。
有谁知道如何解决这个问题?谢谢
解决方案
如果您使用的是 Postgres,那么 Postgres 等价物是CREATE TABLE AS
:
create table temptable as
select *
from act_hi_taskinst;
推荐阅读
- php - 返回点类型 PSQL 和 DOCTRINE
- google-apps-script - 如果单元格与文件夹 ID 匹配,则将工作表复制到文件夹 - 应用程序脚本
- scala - spark.streaming.receiver.maxRate 是否应用于读取 csv 文件的 Spark Streaming readStreams?
- javascript - 如何减少空间
- python - 尝试创建一个返回两个 3x3 矩阵之和的函数
- android - 如何在recyclerview中从第一个元素滚动到第二个元素
- javascript - 无法从网页将数据设置到 Cloud Firestore
- php - App\Entity\User 的查询缺少标识符 id
- c++ - 从 OpenCV 4.5.1 更改为 3.4.0 时出错
- java - Jsoup - 使用相对路径测试有效的输入正文 html