- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
s02 过滤和排序数据
Using the WHERE Clause In the example, the SELECT statement retrieves the name, job ID, and department number of all employees whose job ID is SA_REP. Note that the job title SA_REP has been specified in uppercase to ensure that it matches the job ID column in the EMPLOYEES table. Character strings are case sensitive. Character Strings and Dates Character strings and dates in the WHERE clause must be enclosed in single quotation marks (). Number constants, however, should not be enclosed in single quotation marks. All character searches are case sensitive. In the following example, no rows are returned because the EMPLOYEES table stores all the last names in mixed case: SELECT last_name, job_id, department_id FROM employees WHERE last_name = WHALEN; Oracle databases store dates in an internal numeric format, representing the century, year, month, day, hours, minutes, and seconds. The default date display is DD-MON-RR. Note: Changing the default date format is covered in a subsequent lesson. Instructor Note Some students may ask how to override the case sensitivity. Later in the course, we cover the use of single-row functions such as UPPER and LOWER to override the case sensitivity. Comparison Conditions Comparison conditions are used in conditions that compare one expression to another value or expression. They are used in the WHERE clause in the following format: Syntax ... WHERE expr operator value For Example ... WHERE hire_date=01-JAN-95 ... WHERE salary=6000 ... WHERE last_name=Smith An alias cannot be used in the WHERE clause. Note: The symbol != and ^= can also represent the not equal to condition. Using the Comparison Conditions In the example, the SELECT statement retrieves the last name and salary from the EMPLOYEES table, where the employee salary is less than or equal to 3000. Note that there is an explicit value supplied to the WHERE clause. The explicit value of 3000 is compared to the salary value in the SALARY column
您可能关注的文档
最近下载
- (建筑工程管理)砌砖及基础工程技术交底.pdf VIP
- DB11∕T 1748-2020 物体表面新型冠状病毒样本采集技术规范.pdf
- 三年级劳动技术浙教版下册:任务二 煮鸡蛋 蒸馒头-教学课件.pptx
- (高清版)-B-T 34590.10-2022 道路车辆 功能安全 第10部分:指南.pdf VIP
- 人教版二年级上册数学全册教学设计(配2025年秋新版教材).docx
- 江苏省建筑工程施工质量验收资料 .docx
- 2025新修订《监察法实施条例》培训课件.pptx VIP
- NB∕T 25043.6-2016 核电厂常规岛及辅助配套设施建设施工技术规范 第6部分:管道.pdf
- 2025年四年级上册数学口算天天练100题.pdf VIP
- 《小篮球多种形式的抛接球游戏》第一课时教学设计.pdf VIP
文档评论(0)