Text Literals 文本

Use the text literal notation to specify values whenever string appears in the syntax of expressions, conditions, SQL functions, and SQL statements in other parts of this reference. This reference uses the terms text literal, character literal, and string interchangeably. Text, character, and string literals are always surrounded by single quotation marks. If the syntax uses the term char, then you can specify either a text literal or another expression that resolves to character data — for example, the last_name column of the hr.employees table. When char appears in the syntax, the single quotation marks are not used.

每当字符串出现在本指南其他部分的表达式、条件、SQL函数和SQL语句的语法中时,使用文本符号来指定值。本指南使用术语“文本”、“字符文本”和“可互换的字符串”。文本、字符和字符串文本总是用单引号括起来。如果语法使用术语char,则可以指定文本文本或解析为字符数据的其他表达式-例如,hr.employees表的last_name列。当char出现在语法中时,不使用单引号。

文本或字符串的语法如下:

where N or n specifies the literal using the national character set (NCHAR or NVARCHAR2  data). By default, text entered using this notation is translated into the national character set by way of the database character set when used by the server. To avoid potential loss of data during the text literal conversion to the database character set,set the environment variable ORA_NCHAR_LITERAL_REPLACE to TRUE. Doing so transparently replaces the n' internally and preserves the text literal for SQL processing.

其中n或n使用国家字符集(NCHARNVARCHAR2 数据)指定文字。默认情况下,使用此符号输入的文本在服务器使用时通过数据库字符集转换为国家字符集。为了避免在文本文本转换为数据库字符集期间可能丢失数据,请将环境变量ORA_NCHAR_LITERAL_REPLACE设置为TRUE。这样做可以在内部透明地替换n'并保留用于SQL处理的文本。

In the top branch of the syntax:

在语法的顶部分支中:

• c is any member of the user's character set. A single quotation mark (') within the literal must be preceded by an escape character. To represent one single quotation mark within a literal, enter two single quotation marks.

• c 是用户字符集的任何成员。文本中的单引号(“)前面必须是转义字符。要在文本中表示一个单引号,请输入两个单引号。

• ' ' are two single quotation marks that begin and end text literals.

• ' ' 是开始和结束文本的两个单引号。

In the bottom branch of the syntax:

在语法的底部分支中:

Q or q indicates that the alternative quoting mechanism will be used. This mechanism allows a wide range of delimiters for the text string.

• Q or 表示将使用引号替代机制。这种机制允许为文本字符串使用广泛的分隔符。

• The outermost ' ' are two single quotation marks that precede and follow, respectively, the opening and closing quote_delimiter.

•  最外面的 ' ' 是两个单引号,分别位于左quote_delimiter和右quote_delimiter的前面和后面。

c is any member of the user's character set. You can include quotation marks (") in the text literal made up of c characters. You can also include the quote_delimiter, as long as it is not immediately followed by a single quotation mark.

• 是用户字符集的任何成员。您可以在由 字符组成的文本中包含引号(")。您还可以包括quote_delimiter,只要它不是紧跟在单引号之后。

quote_delimiter is any single- or multibyte character except space, tab, and return. The quote_delimiter can be a single quotation mark. However, if the quote_delimiter appears in the text literal itself, ensure that it is not immediately followed by a single quotation mark.

• quote_delimiter 是除空格、制表符和回车之外的任何单字节或多字节字符。quote_delimiter可以是单引号。但是,如果quote_delimiter出现在文本本身中,请确保它后面不紧跟单引号。

If the opening quote_delimiter is one of [, {, <, or (, then the closing quote_delimiter must be the corresponding ], }, >, or ). In all other cases, the opening and closing quote_delimiter must be the same character.

如果左quote_delimiter是 [, {, <, or (,则右quote_delimiter必须是相应的], }, >, or )。在所有其他情况下,左和右quote_delimiter必须是相同的字符。

Text literals have properties of both the CHAR and VARCHAR2 data types:

文本具有CHARVARCHAR2数据类型的属性:

• Within expressions and conditions, Oracle treats text literals as though they have the data type CHAR by comparing them using blank-padded comparison semantics.

• 在表达式和条件中,Oracle将文本视为具有数据类型char,并使用空白填充的比较语义对其进行比较。

• A text literal can have a maximum length of 4000 bytes if the initialization parameter MAX_STRING_SIZE = STANDARD, and 32767 bytes if MAX_STRING_SIZE = EXTENDED. See Extended Data Types for more information.

• 如果初始化参数MAX_STRING_SIZE = STANDARD,文本的最大长度可以是4000字节;如果MAX_STRING_SIZE = EXTENDED,文本的最大长度可以是32767字节。有关详细信息,请参阅Extended Data Types。

Here are some valid text literals:

以下是一些有效的文本:

'Hello'
'ORACLE.dbs'
'Jackie''s raincoat'
'09-MAR-98'
N'nchar literal'

Here are some valid text literals using the alternative quoting mechanism:

下面是一些使用引号替代机制的有效文本:

q'!name LIKE '%DBMS_%%'!'
q'<'So,' she said, 'It's finished.'>'
q'{SELECT * FROM employees WHERE last_name = 'Smith';}'
nq'ï Ÿ1234 ï'
q'"name like '['"'

SQL Text Literals 文本的更多相关文章

  1. Text input(文本输入框)

    Text input(文本输入框)是用来获得用户输入的绝佳方式. 你可以用如下方法创建: <input type="text"> 注意,input元素是自关闭的.

  2. CSS Text(文本)

    CSS Text(文本) 一.文本颜色 color 颜色属性被用来设置文字的颜色. 颜色是通过CSS最经常的指定: 十六进制值 - 如: #FF0000 一个RGB值 - 如: RGB(255,0,0 ...

  3. text matching(文本匹配) 相关资料总结

    最近工作上需要做句子语义去重相关的工作,本质上这是属于NLP中text matching(文本匹配)相关的内容.因此我花了一些时间整理了一些关于这个方向的资料,整理如下(也许会持续更新): BiMPM ...

  4. [LeetCode] Text Justification 文本左右对齐

    Given an array of words and a length L, format the text such that each line has exactly L characters ...

  5. WebApi接口返回json,xml,text纯文本等

    [Route("api/Message/MessageList/")] [HttpGet] public HttpResponseMessage MessageList() { R ...

  6. UGUI小技巧之Text随文本内容自动变化大小

    看了网上很多帖子,都是说在 Text 上面加上 Content Size Fitter 组件,并将对应的轴向改成 Preferred size 就可以实现 Text 大小随着文本内容自适应,如下图: ...

  7. 用FireDAC获取 SQL SERVER错误文本信息

    SQL SERVER获取错误文本信息,BDE.adoquery一直取不到,FDQuery可以了 Some DBMS, like SQL Server, return messages as an ad ...

  8. Selenium Webdriver——JS处理rich text(富文本框)

    126邮件正文邮件的rich text 先让selenium切换到iframe中 driver.switchTo().frame(driver.findElement(By.className(&qu ...

  9. 【text】 文本组件说明

    text文本组件:在小程序里除了文本节点以外的其他节点都无法长按选中. 原型: <text selectable="[Boolean]" space="[ensp ...

随机推荐

  1. 用selenium自动加载浏览器下载图片

    上一篇用requests这个库进行图片的批量下载,只所以可以这样做,是因为豆瓣提供的XHR的接口API,而且接口返回的数据类型为json格式,所以使用起来非常的方便,但是有时候我们需要分析html格式 ...

  2. .net framework msbuild环境搭建 (不装vs)

    1. 安装 .net framework sdk 小于等于 .net framework 4.5 版本的 .net framework sdk 通过 windows sdk 工具安装 从下面额链接找到 ...

  3. 僵尸进程bug排除方法

    多进程处理存在的问题 直接return 200 子进程 signal.signal(signal.SIGCHLD, signal.SIG_IGN) #不管子进程,不然R的多进程切图会产生僵尸进程

  4. Laravel 登录后跳转回登录前浏览的页面

    一.经过 Auth 中间件检查后跳转至登录页面 也就是没有通过 auth 中间件的认证检查,被 auth 中间件拦截后跳转至登录页面.这种情况下,Laravel 默认会在用户登录成功后自动跳转回登录前 ...

  5. xml 3 字节的 UTF-8 序列的字节 3 无效

    今天在eclipse中编写**.xml文件时,注释中的中文被eclipse识别到错误:3 字节的 UTF-8 序列的字节 3 无效,曾多次遇到该问题,问题的根源是: The cause of this ...

  6. [LeetCode] 901. Online Stock Span 线上股票跨度

    Write a class StockSpanner which collects daily price quotes for some stock, and returns the span of ...

  7. 简单使用Moq框架

    Moq框架简单使用   系列目录 Moq库简介及安装 Moq简介 Moq是.net平台下的一个非常流行的模拟库,只要有一个接口它就可以动态生成一个对象,底层使用的是Castle的动态代理功能. 它的流 ...

  8. Netty学习-IO体系架构系统回顾 & 装饰模式Decorator的具体使用

    Netty学习-IO体系架构系统回顾 IO和NIO的学习 NIO - 1.4 开始出的 在网络应用框架中,NIO得到了大量的使用,特别是netty里面 前提:对IO及其了解 对IO的总结和回顾 理解J ...

  9. TCP/IP学习笔记1--概述,分组交换协议

    1.TCP/IP 互联网是由许多独立发展的网络通信技术融合而成的,能够使它们不断融合并实现统一的正式TCP/IP技术,TCP/IP使通信协议的统称. TCP/IP协议模型(Transmission C ...

  10. SACD-ISO音频镜像播放方式

    SACD-ISO 音频文件不需要解压也不需要挂载光盘,可以直拖入播放器播放. 播放器下载 foobar2000https://www.foobar2000.org/download 解码插件下载 Su ...