Advertisement
l-kikov

Drop column with constraint in SQL

Mar 8th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.28 KB | None | 0 0
  1. /* How to drop columns with constraint */
  2. use codejams
  3. go
  4.  
  5. /* Remove the constraint and drop the column*/
  6. alter table BlockedIpAdresses drop constraint FK__BlockedIp__UserI__5AEE82B9;
  7. alter table BlockedIpAdresses drop column UserID;
  8. alter table [Users] drop column UserName;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement