zoukankan      html  css  js  c++  java
  • delphi 单引号在字符串中使用方法

    可以看delph的帮助,里面有这个问题详细说明:
    A character string, also called a string literal or string constant, consists of a quoted string, a control string, or a combination of quoted and control strings. Separators can occur only within quoted strings.

    A quoted string is a sequence of up to 255 characters from the extended ASCII character set, written on one line and enclosed by apostrophes. A quoted string with nothing between the apostrophes is a null string. Two sequential apostrophes in a quoted string denote a single character, namely an apostrophe. For example,

    'BORLAND'           { BORLAND }  //字符
    'You''ll see'       { You'll see }     //两个'连接在一起代表字符中的一个'号.
    ''''                { ' }   同上.
    ''                  { null string }  //空值
    ' '                 { a space }       //一个空格

     

    示例:
    SQL语句:  where usename like '%张三%'
    str1 :='where ' + FieldName + ' like ' + '''%' + SearchBuffer + '%'''       

     

  • 相关阅读:
    Docker
    Docker
    log4j日志类的使用
    &times被转义成x的解决方法
    java通用的jdbc数据库操作类
    java一个调用webapi的工具类
    Java 开发杂记
    J2EE名词解释
    C# 进程之间的通讯
    如何捕获全局异常
  • 原文地址:https://www.cnblogs.com/smartlittleant/p/4080433.html
Copyright © 2011-2022 走看看