how to make id as primary key in sql data type integer code example Example: create id to primary using query ALTER TABLE lead_offer_notes ADD PRIMARY KEY (id);