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 + '%'''       

     

  • 相关阅读:
    学习网站
    支付宝调用错误:Call to undefined function openssl_sign()
    打包APP
    PHP 转义
    tp5学习
    js函数
    php学习随笔--定时触发
    day07
    60.函数应用:学生管理系统
    59.列表推导式
  • 原文地址:https://www.cnblogs.com/smartlittleant/p/4080433.html
Copyright © 2011-2022 走看看