Pallavi Ghanta posted an Question
October 04, 2021 • 00:57 am 30 points
  • UGC NET
  • Computer Science & Applications

It is possible to change view column name with out effecting base table?

it is possible to change view column name with out effecting base table?

1 Answer(s) Answer Now
  • 0 Likes
  • 1 Comments
  • 0 Shares
  • comment-profile-img>
    Suganya jagath best-answer

    EXECUTE sp_rename 'Sales.SalesTerritory.TerritoryID', 'TerrID', 'COLUMN'; There are few operations that you can do inplace without dropping your table: Expand a varchar column  Make a column nullable (but not vice-versa) Renaming columns using sp_rename If you find yourself in the situation where altering a column is not possible without dropping the table, you can usually use a SELECT INTO query to project your data into a new table, then drop the old table (temporarily disabling constraints) and then renaming the projected table. You will need to take your database offline for maintenance in this case though. Hope you understand.

whatsapp-btn

Do You Want Better RANK in Your Exam?

Start Your Preparations with Eduncle’s FREE Study Material

  • Updated Syllabus, Paper Pattern & Full Exam Details
  • Sample Theory of Most Important Topic
  • Model Test Paper with Detailed Solutions
  • Last 5 Years Question Papers & Answers