LMSouq
database Open

How do I specify unique constraint for multiple columns in MySQL?

NI
Niyaz
1 month ago
3 views
Problem Description
I have a table: table votes ( id, user, email, address, primary key(id), ); How can I make the columns **user, email, address** unique - i.e., ensure that there isn't any pair of rows that has identical values for all three columns?

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base