PDF (A4) - 43.4Mb
Man Pages (TGZ) - 297.1Kb
Man Pages (Zip) - 402.3Kb
Info (Gzip) - 4.3Mb
Info (Zip) - 4.3Mb
MySQL Globalization
MySQL Information Schema
MySQL Installation Guide
Security in MySQL
Starting and Stopping MySQL
MySQL and Linux/Unix
MySQL and Windows
MySQL and macOS
MySQL and Solaris
Building MySQL from Source
MySQL Restrictions and Limitations
MySQL Partitioning
MySQL Tutorial
MySQL Performance Schema
MySQL Replication
Using the MySQL Yum Repository
MySQL NDB Cluster 8.0
You can use thedelete() method to remove some or all records from a table in a database. The X DevAPI provides additional methods to use with thedelete() method to filter and order the records to be deleted.
The following example passes search conditions to thedelete() method. All records matching the condition are deleted from the city table. In this example, one record matches the condition.
mysql-js> db.city.delete().where("Name = 'Olympia'") To delete the first record in the city table, use thelimit() method with a value of 1.
mysql-js> db.city.delete().limit(1) You can delete all records in a table. To do so, use thedelete() method without specifying a search condition.
Use care when you delete records without specifying a search condition; doing so deletes all records from the table.
ThedropCollection() method is also used in MySQL Shell to drop a relational table from a database. For example, to drop thecitytest table from theworld_x database, issue:
mysql-js> session.dropCollection("world_x", "citytest")SeeTableDeleteFunction for the full syntax definition.
SeeSection 22.3.2, “Download and Import world_x Database” for instructions to recreate the
world_xdatabase.
PDF (A4) - 43.4Mb
Man Pages (TGZ) - 297.1Kb
Man Pages (Zip) - 402.3Kb
Info (Gzip) - 4.3Mb
Info (Zip) - 4.3Mb
MySQL Globalization
MySQL Information Schema
MySQL Installation Guide
Security in MySQL
Starting and Stopping MySQL
MySQL and Linux/Unix
MySQL and Windows
MySQL and macOS
MySQL and Solaris
Building MySQL from Source
MySQL Restrictions and Limitations
MySQL Partitioning
MySQL Tutorial
MySQL Performance Schema
MySQL Replication
Using the MySQL Yum Repository
MySQL NDB Cluster 8.0