Remove-CockroachDB Cmdlet
Deletes CockroachDB data.
Syntax
Remove-CockroachDB [parameters]
Remarks
The Remove-CockroachDB cmdlet allows you to use a syntax similar to SQL DELETE statements to delete CockroachDB data.
$conn = Connect-CockroachDB -User 'root' -Password 'root' -Server 'localhost' -Port '26257' -Database 'system' Remove-CockroachDB -Connection $conn -Table "`"defaultdb`".`"public`".Orders" -Id "10261"The Where parameter can also be used to specify the primary key:
Remove-CockroachDB -Connection $conn -Table "exTablePowershell;" -Where "Id = 10261"The primary key can also be passed to the cmdlet along the pipeline:
Select-CockroachDB -Connection $conn -Table "defaultdb"."public".Orders -Where "ShipCountry = 'USA'" | Remove-CockroachDB