SQL Constraint PRIMARY KEY

Publicado em: 15 Setembro 2020
no canal de: Study Desk of Anand
78
23

SQL Constraint Primary Key
In this video, we will see primary key constraint with example.

Link of Unique Constraint:    • SQL Constraint Unique  

PRIMARY KEY –
Uniquely identifies each row in a table
Key points:
Only one primary key per table.
PK does not allow null value.
PK does not allow duplicate values.
PK = NOT NULL+ UNIQUE.

Syntax:
CREATE TABLE tbl_name (
col1 data_type PRIMARY KEY,
... );
OR
CREATE TABLE tbl_name (
col1 data_type not null,
col2 data_type not null, ... ,
CONSTRAINT cons_name PRIMARY KEY (col1, col2) );
OR
ALTER TABLE tbl_name
ADD PRIMARY KEY (col_name)

Connect me to insta ID for any queries
thisisanandyadav


Nesta página do site você pode assistir ao vídeo on-line SQL Constraint PRIMARY KEY duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Study Desk of Anand 15 Setembro 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 78 vezes e gostou 23 espectadores. Boa visualização!