IT story

쿼리를 사용하여 SQL Server에서 null이 아닌 제약 조건을 제거하는 방법

hot-time 2020. 8. 8. 09:59
반응형

쿼리를 사용하여 SQL Server에서 null이 아닌 제약 조건을 제거하는 방법


데이터 손실없이 SQL Server 2008에서 null이 아닌 제약 조건을 제거하려고합니다.


 ALTER TABLE YourTable ALTER COLUMN YourColumn columnType NULL

제약 조건을 제거 not nullnull

ALTER TABLE 'test' CHANGE COLUMN 'testColumn' 'testColumn' datatype NULL;

열 제약 조건 제거 : not nulltonull

ALTER TABLE test ALTER COLUMN column_01 DROP NOT NULL;

참고 URL : https://stackoverflow.com/questions/3370159/how-to-remove-not-null-constraint-in-sql-server-using-query

반응형