prakasham selamban wrote:I have put it this query when i run this query in query analyzer
"alter table students alter column student bigint nocheck constraint all"
it throws error like Incorrect syntax near the keyword 'nocheck'.
prakasham selamban wrote:helo friend
exec sp_MSforeachtable ‘ALTER TABLE ? NOCHECK CONSTRAINT ALL
exec sp_MSforeachtable ‘ALTER TABLE ? CHECK CONSTRAINT ALL
this stored procedure enable and disable constraints in sql.
but only its used to delete or insert the records. This is not used to alter data type in sql. Is there any other query to disable or enable constraint. let me know
alter table id student column ID bigint