문제

I had a table STUDENT_TB, which had column STUDENT_ID, NAME, AGE. I added a column with a following command :-

alter table STUDENT_TB add DOB TIMESTAMP NOT NULL DEFAULT CURRENT TIMESTAMP

as for the DOB column i didn't wanted it to be null. Now i need to remove that default constraint.

I tried searching but not got any success.

Regards.

도움이 되었습니까?

해결책

I tried with this and it worked properly

alter table STUDENT_TB alter DOB drop DEFAULT

다른 팁

ALTER TABLE STUDENT_TB ALTER COLUMN DOB DROP NOT NULL

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top