mysql set field unique
ALTER TABLE mytbl ADD UNIQUE (columnName);
mysql set field unique
ALTER TABLE mytbl ADD UNIQUE (columnName);
mysql unique two columns
CREATE TABLE IF NOT EXISTS cliente (
id bigint primary key auto_increment,
nome varchar(100) not null,
email varchar(100) not null unique,
senha varchar(255) not null,
documento varchar(50) not null unique,
dataCadastro date not null
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us