How do you insert data in MySQL?

To insert data into MySQL, you can use the INSERT INTO statement. Here is a simple example:

Suppose there is a table called “users” with columns id, name, and email, you can use the following command to insert a row of data:

INSERT INTO users (name, email) VALUES ('John Doe', 'john.doe@example.com');

This will insert a new row in a table called “users” with the name ‘John Doe’ and email ‘john.doe@example.com’. Other fields in the table can be included in the INSERT INTO statement as needed.

Leave a Reply 0

Your email address will not be published. Required fields are marked *