网站大量收购独家精品文档,联系QQ:2885784924

数据库习题(Database exercises).doc

  1. 1、本文档共12页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
数据库习题(Database exercises)

数据库习题(Database exercises) Experiment 1, two 1) the student table adds one attribute nation (ethnic), and the data type is varchar (20). 2) delete the new attribute Nation in the student table. 3) create an index called IX_sname for the students and sort them by name. 4) delete the IX_sname index. Create database student_course (created in enterprise manager called student_course database) Use student_course Create table student (SnO, char (9), primary, key, not, null, Sname varchar (20) unique not null, Ssex char (2) not null, Sage smallint not null, Sdept char (5) not null ); Create table course (CNO, char (9), primary, key, not, null, CNAME varchar (20) unique not null, Cpno char (9) not null, Ccrebit smallint ); Create table SC (SnO char (7) not null, CNO char (9) not null, Grade numeric (4,1) ); Insert Into, student (SnO, sname, ssex, sage, sdept) Values (0215125, Chang Li , male ,19,is); Select * from student Insert Into, course (CNO, CNAME, cpno, ccrebit) Values (3, ` information systems,1,4); Select * from course Insert Into, SC (SnO, CNO, grade) Values (1015121,2,85); Select * from SC Alter, table, student, add, snation, varchar (20); Select * from student Alter, table, student, drop, column, snation; Select, SnO, sname From student Select * from student (creating indexes) create, index, IX_sname, on, student (sname); Drop index student.IX_sname; Experiment three Content 1. 1. inquire about the authors number, name and information of all authors 2. query the names of all authors, the authors information, and display the string ID number in front of each authors author number, which indicates that the information displayed is identity information 3. query author, name and city in CA state 4. query the title and date of publication between 1992.1.1-2000.12.31 (query book published in 1991) 5. inquire about the books published by each publisher 6. inquire about the number of books sold by a store 7. inquire about all book information with sales records, includi

您可能关注的文档

文档评论(0)

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

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

版权声明书
用户编号:6111134150000003

1亿VIP精品文档

相关文档