MySQL Forums
Forum List  »  MySQL Workbench

a multi-column unique constraint
Posted by: Radosław Kokoć
Date: April 19, 2023 07:39AM

Hello,

I'm creating a data model using MySQL Workbench. I cannot find a way how to add a multi-column unique constraint to a table according to the following create table command:

CREATE TABLE Persons (
ID int NOT NULL,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Age int,
CONSTRAINT UC_Person UNIQUE (ID,LastName)
).

Could somebody give me a tip on how to do this?

Kind regards,
Radek

Options: ReplyQuote


Subject
Views
Written By
Posted
a multi-column unique constraint
287
April 19, 2023 07:39AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.