Question

Locked

Table Design

By Ather Rehan ·
I have a table Practice(Doctor) which has some following entities...
practice_id(doctor_id), name, address, gender. Practice_id(doctor_id) is primary key. Now I want to alter table to add a new column specialization.But when I query.........

ALTER TABLE Practice ADD specialization char(12)

The error occurs. I knows that the error occurs because of PRIMARY KEY attribute of practice_id(doctor_id).
Now,the one and fool way is that first I drop the PRIMARY KEY constraint, then I TRUNCATE the table and then at last ADD specialization column(entity).
This way is not well to follow. Now please guide me how I add an entity [specialization] without doing this above foolish job.

This conversation is currently closed to new comments.

0 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Share your knowledge
Back to Web Development Forum
0 total posts (Page 1 of 1)  

Related Discussions

Related Forums