oracle 甲骨文 - 字符(39)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22540884/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 02:17:25  来源:igfitidea点击:

Oracle - CHAR(39)

sqlsql-serveroracle

提问by w0051977

What is the equivalent syntax in Oracle:

Oracle 中的等效语法是什么:

SELECT CHAR(39) --this displays an apostrophe on the screen

I have spent some time Googling this; this afternoon. I have tried: CHR(39); ASCII(39) etc. I thought this would be easy to find but it was not.

我花了一些时间在谷歌上搜索这个;今天下午。我试过: CHR(39); ASCII(39) 等。我认为这很容易找到,但事实并非如此。

回答by

SELECT CHR(39) FROM DUAL

Every SELECT needs a FROM in Oracle. DUAL is a table with a single cell in it that is used in cases where you just want to build a row of values yourself. Any table containing a single row would work the same way.

Oracle 中的每个 SELECT 都需要一个 FROM。DUAL 是一个包含单个单元格的表格,用于您只想自己构建一行值的情况。任何包含单行的表都以相同的方式工作。