Cmdlets for MySQL

Build 24.0.9175

Remove-MySQL Cmdlet

Parameters   Output Objects  

Deletes MySQL data.

Syntax

Remove-MySQL [parameters]

Remarks

The Remove-MySQL cmdlet allows you to use a syntax similar to SQL DELETE statements to delete MySQL data.

$conn = Connect-MySQL -User 'myUser' -Password 'myPassword' -Database 'NorthWind' -Server 'myServer' -Port 3306
Remove-MySQL -Connection $conn -Table "`sakila`.Orders" -Id "10261"
The Where parameter can also be used to specify the primary key:
Remove-MySQL -Connection $conn -Table "exTablePowershell;" -Where "Id = 10261"
The primary key can also be passed to the cmdlet along the pipeline:
Select-MySQL -Connection $conn -Table `sakila`.Orders -Where "ShipCountry = 'USA'" | Remove-MySQL

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 24.0.9175