ocp 047-141 Evaluate the following SQL statement:SELECT product_name || 'it's not available for orde
来源:互联网 发布:node pdf导出 编辑:程序博客网 时间:2024/05/18 22:16
Evaluate the following SQL statement:
SELECT product_name || 'it's not available for order' FROM product_information
WHERE product_status = 'obsolete';
You received the following error while executing the above query:
ERROR:
ORA-01756: quoted string not properly terminated
What would you do to execute the query successfully?
A. Enclose the character literal string in the SELECT clause within the double quotation marks.
B. Do not enclose the character literal string in the SELECT clause within the single quotation marks.
C. Use Quote (q) operator and delimiter to allow the use of single quotation mark in the literal character
string.
D. Use escape character to negate the single quotation mark inside the literal character string in the
SELECT clause.
Answer: C
ORA-01756: quoted string not properly terminated
错误:引用字符串不正确地终止
错误原因:多为SQL语句问题,要考虑到字符集这方面
所以错误就是在SELECT product_name || 'it's not available for order' 中的引号这块
1.在字符串单引号处再加一个单引号
product_name || 'it's not available for order' --改为product_name || 'it''s not available for order'
如果字符中包括了单引号,就在该单引号处使用两个单引号;如果字符中出现了双引号,就直接在字符中使用双引号。
单引号的作用:加了单引号的字段是一个字,类似字符串,不区分大小写,,单引号是用来特制的,比如日期字符串的
引用,两个单引号就是纯正的单引号,表示转义。
2、使用“q-quote写法”
product_name || 'it's not available for order' --改为product_name || q'<it's not="" available="" for="" order="">'
Use Quote (q) operator and delimiter to allow the use of single quotation mark in the literal character string.
3、使用“chr(39)写法”
product_name || 'it's not available for order' --改为product_name || ‘ it'||chr(39)||'s not available for order'
- ocp 047-141 Evaluate the following SQL statement:SELECT product_name || 'it's not available for orde
- 146.Evaluate the following SQL statement:
- 155.Evaluate the following SQL statement
- 156.Evaluate the following SQL statement:
- 16.Evaluate the following query: SQL> SELECT promo_name||q'{'s start date was }'||promo_begin_date A
- ocp 047-92 Evaluate the following expression using meta. character for regular expression:'[^Ale|ax
- 43.Evaluate the following CREATE SEQUENCE statement:
- 167.Evaluate the following DELETE statement:
- SQL java.sql.SQLException: Parameter metadata not available for the given statement
- java.sql.SQLException: Parameter metadata not available for the given statement
- java.sql.SQLException: Parameter metadata not available for the given statement
- All packages are not available for download! The following packages are not available:
- SQLException: Parameter metadata not available for the given statement
- Parameter metadata not available for the given statement
- SQLException:Parameter metadata not available for the given statement
- 31.Evaluate the following SQL commands:
- 19.Evaluate the following query:
- 78.Evaluate the following query:
- hdu1874 畅通工程续(求最短路径)
- 开博感言
- HDU5288 OO’s Sequence(序列的整除对数计数) 多校赛1最水题
- 正则表达式的量词
- Objective-C学习笔记(十五)——实例化对象
- ocp 047-141 Evaluate the following SQL statement:SELECT product_name || 'it's not available for orde
- mysql任务调度
- 分红包算法
- 【MVC框架】——Global.asax文件中的RegisterGlobalFilters()和RegisterRoutes()方法
- 获取文件mime_type类型
- 关于调试PLX9054的一些总结和经验
- iOS逆向笔记第一天
- 证明加载类的动作仅发生一次
- HDOJ2072单词数