create id to primary using query 1

create id to primary using query

ALTER TABLE lead_offer_notes ADD PRIMARY KEY (id);

Here is what the above code is Doing:
1. Create a new table called lead_offer_notes
2. Add a column called id that is an integer and auto-increments
3. Add a column called lead_id that is an integer
4. Add a column called offer_id that is an integer
5. Add a column called note that is a string
6. Add a column called created_at that is a datetime
7. Add a column called updated_at that is a datetime
8. Add a primary key to the id column

Similar Posts