Question from the PostgreSQL test

Add a unique constraint on the email column while creating the users table in PostgreSQL.

Medium

Consider the SQL statement below for creating a table with a constraint in PostgreSQL. Which option correctly adds a unique constraint on the email column while creating the users table?

CREATE TABLE users (
    id SERIAL PRIMARY KEY,
    name VARCHAR(100),
    email VARCHAR(255)
);
Author: abdelghaniStatus: PublishedQuestion passed 219 times
Edit
1
Community EvaluationsNo one has reviewed this question yet, be the first!