Varchar
From HandWiki
A VARCHAR or variable character field is a set of character data of indeterminate length. The term varchar refers to a data type of a field (or column) in a database which can hold letters and numbers.[1] Varchar fields can be of any size up to a limit, which varies by databases: an Oracle 11g database has a limit of 4000 bytes,[2] a MySQL 5.7 database has a limit of 65,535 bytes (for the entire row)[3] and Microsoft SQL Server 2008 has a limit of 8000 bytes (unless varchar(max) is used, which has a maximum storage capacity of 2 gigabytes).[4]
nvarchar is a variation of varchar,[5] and which is more suitable depends on the use case.[clarification needed]
See also
- SQL data types
References
- ↑ "The VARCHAR data type" (in en-us). 2018-10-25. https://www.ibm.com/docs/en/informix-servers/12.10.0?topic=ocdt-varchar-data-type.
- ↑ "Database Concepts". https://docs.oracle.com/cd/B28359_01/server.111/b28318/datatype.htm#i1835.
- ↑ "MySQL :: MySQL 5.7 Reference Manual :: 11.4.1 The CHAR and VARCHAR Types". https://dev.mysql.com/doc/refman/5.7/en/char.html.
- ↑ edmacauley (6 June 2024). "char and varchar (Transact-SQL)". https://msdn.microsoft.com/en-us/library/ms176089.aspx.
- ↑ SQL Server differences of char, nchar, varchar and nvarchar data types
