Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 577
  • Last Modified:

Change nchar to nvarchar

Hi,

Within Management Studio -> Edit table, is it safe to change nchar(2000) to nvarchar(2000) without losing data?

Thanks,

Rich
0
rito1
Asked:
rito1
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
yes, it is safe.
normally, you do an UPDATE of the table (all rows) to trim away the trailing spaces from the nchar, though, because the change of the data type will not do that implicitly.
0
 
rito1Author Commented:
Excellent, thanks
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now