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 theinsert() method with thevalues() method to insert records into an existing relational table. Theinsert() method accepts individual columns or all columns in the table. Use one or morevalues() methods to specify the values to be inserted.
To insert a complete record, pass to theinsert() method all columns in the table. Then pass to thevalues() method one value for each column in the table. For example, to add a new record to the city table in theworld_x schema, insert the following record and pressEnter twice.
mysql-js> db.city.insert("ID", "Name", "CountryCode", "District", "Info").values(None, "Olympia", "USA", "Washington", '{"Population": 5000}')The city table has five columns: ID, Name, CountryCode, District, and Info. Each value must match the data type of the column it represents.
The following example inserts values into the ID, Name, and CountryCode columns of the city table.
mysql-js> db.city.insert("ID", "Name", "CountryCode").values(None, "Little Falls", "USA").values(None, "Happy Valley", "USA") When you specify columns using theinsert() method, the number of values must match the number of columns. In the previous example, you must supply three values to match the three columns specified.
SeeTableInsertFunction for the full syntax definition.
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