SQL Server Concat con +
Esempio
Aggiungi 2 stringhe insieme:
SELECT
'W3Schools' + '.com';
Definizione e utilizzo
L'operatore + consente di aggiungere due o più stringhe insieme.
Nota: vedere anche le funzioni CONCAT() e CONCAT_WS() .
Sintassi
string1 +
string2 + string_n
Valori dei parametri
Parameter | Description |
---|---|
string1, string2, string_n | Required. The strings to add together |
Dettagli tecnici
Funziona in: | SQL Server (a partire dal 2005), Database SQL di Azure, Azure SQL Data Warehouse, Parallel Data Warehouse |
---|
Altri esempi
Esempio
Aggiungi 3 stringhe insieme:
SELECT
'SQL' + ' is' + ' fun!';
Esempio
Aggiungi le stringhe insieme (separa ogni stringa con uno spazio):
SELECT
'SQL' + ' ' + 'is' + ' ' + 'fun!';