【问题标题】:How to generate Insert statement from PGAdmin4 Tool?如何从 PGAdmin4 工具生成插入语句?
【发布时间】:2022-10-13 19:40:54
【问题描述】:

我们正在编写一个新应用程序,在测试时,我们需要一堆虚拟数据。我通过使用 MS Access 将 excel 文件转储到 Postgres 数据库的相关表中来添加该数据。

我现在应该怎么做才能从 PGAdmin4 工具生成插入语句,类似于 SQL Studio 允许我们为 SQL Server 生成插入语句?我没有可用的选项。我不能使用最接近的一种,即通过 CSV 导出和导入数据。

【问题讨论】:

  • 你能分享为什么你不能使用最接近的吗?您可以使用COPY command 从 csv 文件中复制数据

标签: pgadmin-4


【解决方案1】:

在 pgAdmin4 中,您可以通过右键单击您的表格来打开上下文菜单:[Database name] > Schemas > Tables > [Table name]。 在上下文菜单中转到:Scripts > INSERT ScriptImport/Export Data 并在对话框中选择您的 CSV 文件

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-09-05
    • 1970-01-01
    • 2017-10-05
    • 2016-08-29
    • 1970-01-01
    • 2012-10-27
    • 2011-03-18
    相关资源
    最近更新 更多