Let's take an example to see how to insert values in a table.
If only one row was inserted and Oid is the numeric OID of the inserted row.
The following table shows the output messages and their meaning: Output message If the column allows NULL values, we can ignore a column from the PostgreSQL insert command.We must offer each NOT NULL column value if we are inserting the records into a table using the PostgreSQL insert command.If DEFAULT is specified, the consistent column will be occupied with its default value. If expression1 is specified, then column1 would be granted the value of expression1, column2 would be given the value of expression2, and so on. These are the values allocated to the columns in the table. And it is used in the third syntax.Įxpression1 | DEFAULT, expression2 | DEFAULT It is used when we want to insert the data from another table. These are the conditions that must be occurred for the records to be inserted.Īll columns will be defined with their default values. It is an optional parameter and used in the third syntax. These are the names of the columns in the table where we want to insert data. It is used to represent the existing table name. The below table shows the Parameters or Arguments used in the insert table syntax: Parameter