19/10/2012

[SQL] SQL Server String concatenation and functions

In Oracle, you can concatenate two strings with ||

eg: SELECT 'string1'||'string2' FROM DUAL;

In Microsoft SQL Server you should: use (string1+string2) DON'T forget the parentheses

eg: SELECT ('string1'+'string2');

On MSDN you can also find a complete list of all SQL Server String functions.

No comments:

Post a Comment

With great power comes great responsibility