7/24/2016

將資料以Unicode 方式存入SQL Server資料庫


作法是在字串前方加上N的字元。
  •  Insert
  • Insert into material_code ( code, name ) values ( 'A0001', N'塑膠' )

  • Update 
  • Update material_code set name = ( N'木材' ) where code = 'A0001'
     
參考資料 https://msdn.microsoft.com/en-us/library/ms177523.aspx