Write a postgre SQL statement to insert records into the table countries to ensure that the country_id column will not contain any duplicate data and this will be automatically incremented and the column country_name will be filled up by 'N/A' if no value assigned to that column.
Here is the code to create a sample table countries:
Now insert one record into the table:
Here is the command to see the list of inserting rows :
Now insert another two records into the table :
Now see the value of the key field incremented automatically:
need an explanation for this answer? contact us directly to get an explanation for this answer