- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Principles of Database Systems (双语教学课程); Chapter 3 SQL(Structured Query Language ) 结构化查询语言;Outline;1 Background -History;Background;Background;Background;Background; 示例数据库1; 示例数据库2;2 Data Definition Language (DDL);DDL;Domain Types in SQL;Domain Types in SQL;Domain Types in SQL;Domain Types in SQL Server 2005;Domain Types in SQL Server 2005-Summary;create domain;Create Table Construct;Example:
create table branch (branch-name char(15) not null, branch-city char(30), assets integer);Integrity Constraints in Create Table;Integrity Constraints in Create Table;Create Table;Create Table;Create Table;Create Table;Alter Table Constructs;Alter Table Constructs;Drop table;drop table;在SQL Server中建立数据库和表;3 Basic Structure of queries;Basic Structure;An simple Example;The select Clause;The select Clause;The select Clause;The select Clause;The where Clause;The where Clause operators;The where Clause- between;between;The from Clause;The from Clause;The Rename Operation;The Rename Operation;Tuple Variables(元组变量);Tuple Variables;String Operations(字符串操作);String Operations;String Operations;Ordering the Display of Tuples元组显示顺序;4 Set Operations(集合操作);Set Operations;示例
求选修了001或(且)002号课程的学生号
(select SNO
from SC
where CNO = ‘001’)
union (intersect)
(select SNO
from SC
where CNO = ‘002’);求选修了001和002号而没有选003号课程的学生号
(select SNO
from SC
where CNO = ‘001’ or CNO = ‘002 ‘ )
except
(select SNO
from SC
where CNO = ‘003’ );5 Aggregate Functions(聚集函数);Aggregate Functions;Aggregate Functions – Group By;Aggregate Functions – Group By;Aggregate Functions – Group By;Aggregate Functions – Having Clause;Aggregate Functions – Having Clause;6 Null Values(空值);Null Values;Null Values;Null Values;Null Values;7 Nested Subqueries(嵌套子查询);SQL Server中的子查询;Set Membership(集合成员资格);Example Query;Example Query;Example Query;Example Query;Example Query;Example Query-SQL Ser
原创力文档


文档评论(0)