Bug #923 concat as In Oracle or SQLServer
| Submitted: | 25 Jul 2003 1:18 | Modified: | 27 Aug 2003 13:20 |
|---|---|---|---|
| Reporter: | [ name withheld ] | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: User-defined functions ( UDF ) | Severity: | S4 (Feature request) |
| Version: | 1.4.0-alpha | OS: | Windows (Windows) |
| Assigned to: | CPU Architecture: | Any |
[27 Aug 2003 13:20]
Peter Zaitsev
MySQL has possibility to use || for concat operation, try running MySQL server with --ansi option It will make its behavior more ansi-like in some other cases.
[29 Aug 2003 1:10]
[ name withheld ]
Ok, I can set sql-mode to have "||" as in Oracle. But if I do a query SELECT Code+"a" FROM MyTable (SQLServer syntax to add two strings) I get a 0 as the sum of the two strings. I think that having "+" between strings to concatenate two string is what every user expect.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.038 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: The "concat" function is very different from Oracle, SQL Server, DB2 or standard SQL/92, so is very difficult to port queries. Oracle uses " 'string1' || 'string2' " and SQL Server " 'string1' + 'string2' ". The standard SQL/92 is '||' In MySQL the syntax is " concat('string1','string2') ". How to repeat: create table items (id char(10), descr char(30)) select id || ':' || descr from items