Search notes:

SQL Server: datatype varchar

SQL Server 2019 has full support for storing UTF-8 characters in a varchar. The collation must be set to a value with an utf8 suffix, for example latin1_general_100_ci_as_sc_utf8.

Concatenating strings

Two varchars can be concatenated with the + operator:
declare
   @str_1  varchar(10) = 'hello',
   @str_2  varchar(10) = 'world';

   print(@str_1 + ' ' + @str_2 + '.');
go
Github repository about-MSSQL, path: /t-sql/data-types/varchar/plus.sql

See also

nvarchar
data types

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1737533538, '3.23.101.241', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/SQL-Server/T-SQL/data-types/varchar/index(51): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78