- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
* 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 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 symbols != and ^= can also represent the not equal to condition. * Using Comparison Conditions In the example, the SELECT statement retrieves the last name and salary from the EMPLOYEES table for any employee whose salary is less than or equal to $3,000. 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 of the EMPLOYEES table. * * * * * * * Logical Conditions A logical condition combines the result of two component conditions to produce a single result based on those conditions, or it inverts the result of a single condition. A row is returned only if the overall result of the condition is true. Three logical operators are available in SQL: AND OR NOT All the examples so far have specified only one condition in the WHERE clause. You can use several conditions in one WHERE clause using the AND and OR operators. * * * * Rules of Precedence The rules of precedence determine the order in which expressions are evaluated and calculated. The table lists the default order of precedence. You can override the default order by using parentheses around the expressions that you want to calculate first. * 1. Example of the Precedence of the AND Operator In this example, there are two conditions: The first condition is that the job ID is AD_PRES and the salary is greater than $15,000. The second condition is that the job ID is SA_REP. Therefore, the SELECT statement reads as follows: “Select the row if an employee is a president and earns more than $15,000, or if the employee is a sales representative.” 2. E
您可能关注的文档
最近下载
- americanculture小学英语美国文化专题.pptx VIP
- 中国珠宝首饰传统文化 夏商周 中国古代夏商周(商)首饰种类2.pptx VIP
- 大学生科技创新课程之中美青年创客大赛(西南交通大学)中国大学MOOC 慕课 章节测验 期末考试答案.docx VIP
- 中国珠宝首饰传统文化 夏商周 中国古代夏商周(夏)首饰种类1.pptx VIP
- 【课程思政案例】《机械设计基础》.docx VIP
- 2025中级注册安全工程师《安全生产技术基础》考前密训10页纸.docx VIP
- 科研伦理与学术规范期末考试答案.docx VIP
- 检验科重点专科汇报.pptx VIP
- 重大社2024《财务实训教程—智能财务共享》教学课件-费用共享.pptx VIP
- AmericanCulture.ppt VIP
文档评论(0)