数据库技术与应用 (全套完整课件)课件.ppt

  1. 1、本文档共387页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
连接查询—例子 Relation loan Relation borrower customer-name loan-number Jones Smith Hayes L-170 L-230 L-155 amount 3000 4000 1700 branch-name Downtown Redwood Perryridge loan-number L-170 L-230 L-260 Note: borrower information missing for L-260 and loan information missing for L-155 Joined Relations – Examples loan inner join borrower on loan.loan-number = borrower.loan-number loan left outer join borrower on loan.loan-number = borrower.loan-number branch-name amount Downtown Redwood 3000 4000 customer-name loan-number Jones Smith L-170 L-230 loan-number L-170 L-230 branch-name amount Downtown Redwood Perryridge 3000 4000 1700 customer-name loan-number Jones Smith null L-170 L-230 null loan-number L-170 L-230 L-260 Joined Relations – Examples* loan natural inner join borrower loan natural right outer join borrower branch-name amount Downtown Redwood 3000 4000 customer-name Jones Smith loan-number L-170 L-230 branch-name amount Downtown Redwood null 3000 4000 null customer-name Jones Smith Hayes loan-number L-170 L-230 L-155 Joined Relations – Examples loan full outer join borrower using (loan-number) Find all customers who have either an account or a loan (but not both) at the bank. branch-name amount Downtown Redwood Perryridge null 3000 4000 1700 null customer-name Jones Smith null Hayes loan-number L-170 L-230 L-260 L-155 select customer-name from (depositor natural full outer join borrower) where account-number is null or loan-number is null 概 要 ★概述 ★ SQL的数据定义 ★ SQL的数据查询 SQL的数据更新 ★ 视图的定义和对视图的操作 SQL的数据更新 用SQL语句向数据库中的相应关系 ★删除数据库数据 ★修改数据库数据 ★增加数据库数据 13 删除 ★删除请求可以删除整个元组,但不能只删除某些属性上的值。其格式如下: delete from R where F ★其意义是:从关系R 中删除满足条件F 的元组。如果省略F语句,则 R中所有元组都被删除,但表的定义仍存在。 删除(续) ★三种删除方式 □删除某一个元组的值 □删除多个元组的值 □带子查询的删除语句 例子 ★删除Perryridge 分支机构的所有帐户 delete from account where branch-name =‘Perryidge’ ★删除位于Needlham的每一个分行的所有帐户 delete from account where branch-name in (select branch-name from branch

文档评论(0)

jllkk31 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档