Cmdlets for EnterpriseDB

Build 21.0.7930

Update-EnterpriseDB Cmdlet

Parameters   Output Objects  

Updates EnterpriseDB data.


Update-EnterpriseDB [parameters]


The Update-EnterpriseDB cmdlet allows you to use a syntax similar to SQL UPDATE statements to update EnterpriseDB data.

$conn = Connect-EnterpriseDB -User 'postgres' -Password 'admin' -Server '' -Port '5444' -Database 'postgres'
Update-EnterpriseDB -Connection $conn -Table "`"postgres`".`"public`".Orders" -Columns @("ShipCity") -Values @("Raleigh") -Id "10261"
The Where parameter can also be used to specify the primary key of the table:
Update-EnterpriseDB -Connection $conn -Table "`"postgres`".`"public`".Orders" -Columns @("ShipCity") -Values @("Raleigh") -Where "Id = '10261'"
The primary key can also be passed to the cmdlet along the pipeline:
Select-EnterpriseDB -Connection $conn -Table "postgres"."public".Orders -Where "ShipCountry = 'USA'" | Update-EnterpriseDB -Columns @("ShipCountry") -Values @("USA 2")

Copyright (c) 2021 CData Software, Inc. - All rights reserved.
Build 21.0.7930