Re: SQL-92 and concatenation

From: Jeff Zucker <jeff_at_vpservices.com>
Date: Fri, 21 Jun 2002 10:06:35 -0700
Message-ID: <3D135D1B.8020306_at_vpservices.com>


Mark Lassau wrote:

> Can someone tell me if
>
> SELECT '1' + '2' FROM GUFF
>
> should return 12 or 3 (for each row in GUFF)
> according to the SQL-92 standard?

None of the above. The SQL92 string concatenation character is || so it wouldn't return 12 according to the standard. And I believe that the standard would require an explicit CAST to treat the strings '1' and '2' as numbers so it wouldn't return a 3 either.

-- 
Jeff
Received on Fri Jun 21 2002 - 19:06:35 CEST

Original text of this message