I m taking abt sql server R2. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 7 years, 1 month ago. Active 5 months ago. Viewed 79k times. How do I correct the data type of this column so that it accepts decimal places?
Table is dbo. Asked 12 years, 10 months ago. Active 2 months ago. Viewed k times. Improve this question. Ascalonian Ascalonian Add a comment. Active Oldest Votes. Improve this answer. Why should it be specified? What is the benefit? Everything I want to leave as it is I don't have to mention, I think. TheincredibleJan That would be cool, but unfortunately it doesn't work that way.
This only works if you don't have constraints and indexes on that column, otherwise, you need to drop everything and recreate it, which is tedious and grunt work, especially if you have many foreign references on that column. Even with my Designer Tab closed on the Table I was Altering after running the script and right-clicking on the Table to select "Design" it still showed the old Data Types!
Certificate varchar 5 ,. Author Recent Posts. Nisarg Upadhyay. He has expertise in database design, performance tuning, backup and recovery, HA and DR setup, database migrations and upgrades. He has completed the B. Tech from Ganpat University. Notice that the "DateOfBirth" column is now of type year and is going to hold a year in a two- or four-digit format. Next, we want to delete the column named "DateOfBirth" in the "Persons" table. We just launched W3Schools videos.
Get certified by completing a course today!
0コメント