Reviews String SQl

Noha Nway 0 Reputation points
2025-03-10T10:11:59.7866667+00:00

I note that Transact-SQL use + with many queries like this

SELECT PurchaseOrderNumber + ' (' + STR(RevisionNumber, 1) + ')' AS OrderRevision, CONVERT(nvarchar(30), OrderDate, 102) AS OrderDate FROM SalesLT.SalesOrderHeader;

'()' Why we use this Thanks

Developer technologies | Transact-SQL
{count} votes

1 answer

Sort by: Most helpful
  1. Olaf Helper 47,436 Reputation points
    2025-03-10T10:20:42.5366667+00:00

    It's a simple + (String concatenation) (Transact-SQL) , a shorter way for writing a concat:

    CONCAT (Transact-SQL)

    Example:

    select 'Hello ' + 'World'
    
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.