Back to Browse

Datatypes in SQL Server (Char, Varchar, Nvarchar, Nchar) Session 1

1.5K views
Sep 11, 2023
16:05

Datatypes: Char, Varchar, Nvarchar, Nchar Char The maximum length of 8000 characters. (Fixed-Length non-Unicode Characters) Varchar The maximum length of 8000 characters. (Variable-Length non-Unicode Characters) Nvarchar The maximum length of 4000 characters. (Variable-Length Unicode Characters) Nchar The maximum length of 4000 characters (Fixed-Length Unicode Characters) ------------------------------------------------------------------------------------------------------------------------------------------------------ declare @firstname nchar(1000)='ab' select @firstname select len(@firstname) as lengthofvariable select DATALENGTH(@firstname) as memorylength

Download

0 formats

No download links available.

Datatypes in SQL Server (Char, Varchar, Nvarchar, Nchar) Session 1 | NatokHD