some case these two same.
suppose we have two dataitems. 1.no2.name
we want to new data item combination of dataitem1(int) and dataitem 2(varchar).
then simple we use concat or ' '.
suppose those two data items are integers then concat perform same operation and ' ' perform addition.that is the difference

The SQL standard string concatenation operator is ||, some vendors offer a
scalar function concat. Typically, one would expect similar
elapsed times as both would use the same code internally most likely.

ORACLE is an example of a vendor who documents where they do NOT align to
the ISO-SQL standard with respect to the treatment of
zero-length ('') strings. In their case they treat them as NULL which is
non-standard. If you are using ORACLE *AND* the term either side
of the concatenation operator allows NULLS then the expression ORACLE is
presented will include a CASE-expression which will return
a result consistent with the standard. If you were to use the ORACLE
concat() scalar function you would get the ORACLE behaviour.

In your follow up what you are adding as additional cost if a type
conversion of an integer to a string which is done per tuple. If you are
concatenation solely to form a compound field to display it would be better
to just use the layout facilities of ReportStudio etc vs generating a
compound field
that way.

In short, if you want a more definitive answer based on your data volumes
etc write a small test program in C/C++ or Java and time your own hand
written statement
multiple times or do a similar with a simple test script in your database
test tool etc.

Copyright 1998-2015 Ziff Davis, LLC (Toolbox.com). All rights reserved. All product names are trademarks of their respective companies. Toolbox.com is not
affiliated with or endorsed by any company listed at this site.