I have table name called "Person" with following column names
P_Id(int),
LastName(varchar),
FirstName (varchar).
I forgot to give NOT NULL
Constraint to P_Id
.
Now I tried with following query to add NOT NULL
Constraint to existing column called P_Id
,
1. ALTER TABLE Person MODIFY (P_Id NOT NULL);
2. ALTER TABLE Person ADD CONSTRAINT NOT NULL NOT NULL (P_Id);
I am getting syntax error....
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…