ocp-047-91
来源:互联网 发布:embed.js 教程 编辑:程序博客网 时间:2024/04/27 14:59
Evaluate the following SQL statement:
SELECT street_address
FROM locations WHERE REGEXP_INSTR(street_address,'[^[:alpha:]]') = 1;
Which statement is true regarding the output of this SQL statement?
A. It would display all the street addresses that do not have a substring
'alpha'.
B. It would display all the street addresses where the first character is
a special character.
C. It would display all the street addresses where the first character is
a letter of the alphabet.
D. It would display all the street addresses where the first character is
not a letter of the alphabet.
Answer: D
REGEXP_INSTR 有6个参数:
第一个是输入的字符串 第二个是正则表达式
第三个是标识从第几个字符开始正则表达式匹配。(默认为1)
第四个是标识第几个匹配组。(默认为1)
第五个是指定返回值的类型,如果该参数为0,则返回值为匹配位置的第一个字符,如果该值为
非0则返回匹配值的最后一个位置。
第六个是是取值范围:
i:大小写不敏感; c:大小写敏感; n:点号 . 不匹配换行符号;
m:多行模式; x:扩展模式,忽略正则表达式中的空白字符。
正则表达式规则: [^. . .] --- A “not equals” bracket expression
| --- Logical OR.
. --- Match any character in the database character set.
$ --- End of line anchor
^ --- Beginning of line anchor.
+ ---Match one or more occurrences of the preceding subexpression.
SQL> select REGEXP_I NSTR('1234aa','[:alpha:]') from dual; 第一个字母的位置
REGEXP_INSTR('1234AA','[:ALPHA:]')
----------------------------------
5
SQL> select REGEXP_INSTR('1234aa','[^[:alpha:]]') from dual; 第一个非字母的位置
REGEXP_INSTR('1234AA','[^[:ALPHA:]]')
-------------------------------------
1
做题的是注意细节,有[^表示非的意思
- ocp-047-91
- ocp-91
- ocp 认证 047
- OCP-047external table
- OCP-047 Pivoting INSERT
- OCP-047 MERGE into
- OCP-047 REGEXP_INSTR()
- OCP-047 delete
- OCP-047 time_zone 参数
- OCP-047 CHECK
- ocp-047-13
- ocp-047-15
- ocp-047-17
- ocp-047-24
- ocp-047-23
- ocp-047-45
- ocp-047-64
- ocp-047-61
- pat 1055 区间前k个
- Diaolog 响应back键,而不响应 外围点击,消失
- POJ 3461 Oulipo(简单KMP)
- 软件层面看硬件
- 静态库与动态库剖析
- ocp-047-91
- URAL 1200 - Horns and Hoofs(暴力+剪枝)
- php学习(一)
- 多线程Java Socket编程示例
- 准确进行网速测试的方法(适用于电信,联通等多种网络)
- 变更数据捕获方法讨论
- 自己写的安卓程序如何改变图标
- 处女作—学生信息管理系统
- 关于swftools软件的使用(另吐糟网上的一些人对中文问题的胡乱解决说法!!)