String Operators 字符串 oracle/mssql 对比

来源:互联网 发布:重复数据阴影 编辑:程序博客网 时间:2024/06/06 15:00

                                                                   Microsoft SQL
                                                                   Server or Sybase
                                            Same in Both           Adaptive Server
                    Operator                Databases              Only                    Oracle Only

                    Concatenate             s                           +                      ||

                    Identify Literal         'this is a string'    "this is also a string"

                    Recommendations:

                    Replace all addition of strings with the || construct.

                    Replace all double quotes string identifiers with single quote identifiers.

                    In Microsoft SQL Server or Sybase Adaptive Server, an empty string ('') is interpreted
                    as a single space in INSERT or assignment statements on VARCHAR data. In
                    concatenating VARCHAR, CHAR, or TEXT data, the empty string is interpreted as a
                    single space. The empty string is never evaluated as NULL. You must bear this in
                    mind when converting the application.

原创粉丝点击