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:
- Inserting a single record:
INSERT INTO people VALUES (20, 'Tony');
- Inserting multiple records:
INSERT INTO people VALUES (57, 'Joe'), (8, 'Ruby');
- Inserting data into specific columns:
INSERT INTO people (name) VALUES ('Harry');
To execute these queries using TablePlus SQL editor, follow these steps:
- Open TablePlus and connect to your database.
- In the SQL editor, paste one of the provided queries.
- Select the query with your mouse.
- 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.