Oopss!!! i am extremely sorry fr making a mess..:( what i wanted to say that at the last column some rows have null values and some rows have a value which is not necessary.. So what i wanted to do to delete those rows which have not null values in last column and then deleting the whole last column..
Here it is:
Delete from dbo.YourTable Where Last_Column IS NOT NULL
After that, dropping the column is easy if you go to table right click -> design If it doesn't let you drop the column due to an error, you should do this: Tools -> Options -> Designers-> Uncheck "Prevent saving changes that require table re-creation"
I'd suggest that you undo that change after you're done though.
发布评论
评论(3)
我的回答是基于您的评论:
如下:
之后,如果您右键单击表格 -> ,则可以轻松删除该列。设计
如果由于错误而不允许您删除该列,您应该执行以下操作:
工具->选项->设计师->取消选中“防止保存需要重新创建表的更改”,
但我建议您在完成后撤消该更改。
祝你好运=)
My answer is based on your comment:
Here it is:
After that, dropping the column is easy if you go to table right click -> design
If it doesn't let you drop the column due to an error, you should do this:
Tools -> Options -> Designers-> Uncheck "Prevent saving changes that require table re-creation"
I'd suggest that you undo that change after you're done though.
Best of luck =)
您尝试做的事情不会起作用,因为它们都具有相同数量的列。
因此,不要浪费时间尝试实现它,因为它无法解决您想要解决的任何问题!
What you're trying to do won't work because they'll all have the same number of columns.
So don't waste your time trying to implement it because it won't solve whatever problem you're trying to solve!