Cmdlets for MariaDB

Build 24.0.9060

Update-MariaDB Cmdlet

Parameters   Output Objects  

Updates MariaDB data.

Syntax

Update-MariaDB [parameters]

Remarks

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

$conn = Connect-MariaDB -User 'myUser' -Password 'myPassword' -Database 'NorthWind' -Server 'myServer' -Port 3306
Update-MariaDB -Connection $conn -Table "Orders" -Columns @("ShipCity") -Values @("Raleigh") -Id "10261"
The Where parameter can also be used to specify the primary key of the table:
Update-MariaDB -Connection $conn -Table "Orders" -Columns @("ShipCity") -Values @("Raleigh") -Where "Id = '10261'"
The primary key can also be passed to the cmdlet along the pipeline:
Select-MariaDB -Connection $conn -Table Orders -Where "ShipCountry = 'USA'" | Update-MariaDB -Columns @("ShipCountry") -Values @("USA 2")

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060