You can use ISNULL(....)
SET @Concatenated = ISNULL(@Column1, '') + ISNULL(@Column2, '')
If the value of the column/expression is indeed NULL, then the second value specified (here: empty string) will be used instead.
More Related Contents:
- nvarchar concatenation / index / nvarchar(max) inexplicable behavior
- Altering a column: null to not null
- How much size “Null” value takes in SQL Server
- What is the PostgreSQL equivalent for ISNULL()
- Updating image in VB and SQL Server not working [closed]
- Where clause not working in sql server
- Compare the values of column in SQL Server
- T-SQL stored procedure that accepts multiple Id values
- How do I escape a percentage sign in T-SQL?
- Get list of databases from SQL Server
- When/Why to use Cascading in SQL Server?
- SQL Update with row_number()
- SQL Server – Dynamic PIVOT Table – SQL Injection
- Preserving ORDER BY in SELECT INTO
- Is a single SQL Server statement atomic and consistent?
- SQL Server file names vs versions [closed]
- How to add xml encoding to xml Output in SQL Server
- What are the differences between a clustered and a non-clustered index?
- Unable to begin a distributed transaction
- Difference between #temptable and ##TempTable?
- How to add custom attributes to SQL connection string?
- Compute MD5 hash of a UTF8 string
- Sort Bullets in Database
- How to check SQL Server Database compatibility after sp_dbcmptlevel is deprecated?
- How do I remove non-breaking spaces from a column in SQL server?
- Why is casting from float to varchar being rounded in SQL Server?
- SQL SERVER PIVOT table with joins and dynamic columns
- SQL Server 2008 can’t login with newly created user
- Update SQL with consecutive numbering
- Nested transactions in Sql Server