-4

Please ecplain the usuability difference between varchar and nvarchar in MYSQL

In which case, we should use varchar datatype column and nvarchar datatype column using MySQL

Shadow
  • 33,525
  • 10
  • 51
  • 64
  • 3
    https://dev.mysql.com/doc/refman/8.0/en/charset-national.html – Iłya Bursov Feb 18 '23 at 15:06
  • As a general rule "National Char" was a solution to store characters outside the ASCII range in the old days when Unicode didn't exist or wasn't yet implemented. Depending on the engine a national char can have several drawbacks, and nowadays it's cleaner and much simpler to stick to Unicode VARCHAR columns if you need non-ASCII characters. – The Impaler Feb 18 '23 at 15:18
  • 1
    @shadow Unfortunate choice of question as the dupe as the accepted answer is incorrect. – user1191247 Feb 18 '23 at 16:04

1 Answers1

-1

Nvarchar and Varchar both are used to store variable length character data type. But Nvarchar stores unicode characters like chinese,japanese. Nvarchar length is two times its actual length.