Update-MariaDB Cmdlet
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")