- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Oracle触发器与存储过程高级编程.
User-Defined Operators—用户自定义运算符
Like built-in operators, user-defined operators take a set of operands as input and return a result. However, you create them with the CREATE OPERATOR statement, and they are identified by names. They reside in the same namespace as tables, views, types, and standalone functions.
Once you have defined a new operator, you can use it in SQL statements like any other built-in operator. For example, you can use user-defined operators in the select list of a SELECT statement, the condition of a WHERE clause, or in ORDER BY clauses and GROUP BY clauses. However, you must have EXECUTE privilege on the operator to do so, because it is a user-defined object.
For example, if you define an operator includes, which takes as input a text column and a keyword and returns 1 if the row contains the specified keyword, you can then write the following SQL query:
SELECT * FROM product_descriptions
WHERE includes (translated_description, Oracle and UNIX) = 1;
Concatenation Operator—字符连接运算符
The concatenation operator manipulates character strings and CLOB data. Table?3-3 describes the concatenation operator.
Table 3-3 Concatenation Operator
Operator Purpose Example || Concatenates character strings and CLOB data. SELECT Name is || last_name
FROM employees; The result of concatenating two character strings is another character string. If both character strings are of datatype CHAR, the result has datatype CHAR and is limited to 2000 characters. If either string is of datatype VARCHAR2, the result has datatype VARCHAR2 and is limited to 4000 characters. If either argument is a CLOB, the result is a temporary CLOB. Trailing blanks in character strings are preserved by concatenation, regardless of the datatypes of the string or CLOB.
On most platforms, the concatenation operator is two solid vertical bars, as shown in Table?3-3. However, some IBM platforms use broken vertical bars for this operator. When moving SQL script files between systems h
您可能关注的文档
最近下载
- 湖南省自然科学基金学科分类目录及代码.pdf VIP
- 人教版三年级上册道德与法治教学计划.docx VIP
- 检验检测机构资质认定评审准则培训考试卷(附答案).docx VIP
- 事业单位内部控制操作手册.pdf VIP
- DB32T 4611-2023 建设用地地下水污染修复和风险管控技术导则.pdf VIP
- 8.煮面条(课件) 教学课件.ppt VIP
- 《新媒体技术:基础 案例 应用》课件 项目5 使用自媒体工具.pptx VIP
- 2025年济南市中考语文试题卷(含答案解析).docx
- 第2课 第二次鸦片战争 课件(26张PPT).pptx VIP
- 项贤明主编马工程教材《教育学原理》第九章教师与学生.ppt VIP
文档评论(0)