After your table is already created, you can add multiple kind of information..

Let’s start

You can now start adding data into it with the INSERT INTO command:

  1. Inserting a single record:
INSERT INTO people VALUES (20, 'Tony');
  1. Inserting multiple records:
INSERT INTO people VALUES (57, 'Joe'), (8, 'Ruby');
  1. Inserting data into specific columns:
INSERT INTO people (name) VALUES ('Harry');

To execute these queries using TablePlus SQL editor, follow these steps:

  1. Open TablePlus and connect to your database.
  2. In the SQL editor, paste one of the provided queries.
  3. Select the query with your mouse.
  4. Click on “Run Current” to execute the query.

After executing the queries, you can refresh the database view, click on the “people” table, and inspect its content. You’ll see the inserted data reflecting the changes made.

Conclusion

These INSERT INTO commands allow you to populate your database tables with the necessary data, providing a foundation for meaningful interactions and queries. Feel free to experiment with different values and combinations to familiarize yourself with the process of inserting data into a SQL database.

author avatar
Maria Lorena Assistant Professor II

Categorized in:

Technology,