Answers for "unique constraint mysql"

SQL
3

mysql set field unique

ALTER TABLE mytbl ADD UNIQUE (columnName);
Posted by: Guest on March-06-2020
1

mysql alter table set column unique

ALTER TABLE contacts
ADD CONSTRAINT contacts_unique UNIQUE (reference_number);
Posted by: Guest on June-17-2020
0

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;
Posted by: Guest on November-30-2020

Code answers related to "unique constraint mysql"

Code answers related to "SQL"

Browse Popular Code Answers by Language