postgresqlHow do I insert data into a PostgreSQL database?
The following example shows how to insert data into a PostgreSQL database using the INSERT statement:
INSERT INTO table_name (column1, column2, column3)
VALUES (value1, value2, value3);
Code explanation
**
INSERT INTO: This is a keyword used to indicate that data is being inserted into the database.table_name: This is the name of the table that the data will be inserted into.column1, column2, column3: This is a list of the columns that the data will be inserted into.VALUES: This is a keyword used to indicate the values that will be inserted into the columns.value1, value2, value3: This is a list of the values that will be inserted into the columns.
## Helpful links
More of Postgresql
- How can I troubleshoot zero damaged pages in PostgreSQL?
- How can I integrate PostgreSQL with Yii2?
- How can I use PostgreSQL's "zero if null" feature?
- How do I use PostgreSQL and ZFS together?
- How do I use PostgreSQL ZonedDateTime to store date and time information?
- How can I monitor PostgreSQL performance using Zabbix?
- How can I extract the year from a PostgreSQL timestamp?
- How do I export data from PostgreSQL to an XML file?
- How can I decide between PostgreSQL and MongoDB for my software development project?
- How do I use regexp_replace in PostgreSQL?
See more codes...