Primary key - driving license

Primary key vs foreign key

What is the difference between primary and foreign keys in relational databases?

Primary keys serve as the identifier of a unique record in a database table. It can be unique information, such as a driver’s license number, telephone number including area code, car VIN number, etc.

Primary key - driving license
CREATE TABLE `ecommerce`.`customer` ( 
   `driving_license` VARCHAR(100),
   `name` VARCHAR(150) NOT NULL,
   `surname` VARCHAR(150) NOT NULL,
   `email` VARCHAR(150),
   `phone` VARCHAR(200),
    PRIMARY KEY `Primary key`(

Multi-column primary keys

A primary key can contain one or more columns.Read the rest

Quick links

Free Trial Buy Now!

Blog categories