Unique constraints in PostgreSQL
In this article, we will see how to use unique constraints in PostgreSQL.
The PostgreSQL UNIQUE constraint makes sure that our column has uniqueness of the values entered into it or in a table.
We can add unique constraint to one or more than one column as group in PostgreSQL.
Lets see how to use unique constraints in PostgreSQL.
CREATE TABLE tb3 ( mail varchar (10) UNIQUE );
Lets see how to use unique constraints in PostgreSQL example .
In above example, we created a table with a unique column constraint and tried to enter some vale twice. PSQL indicates error and not did not let us to do it.