正文

sql数据库study(配合JAVA)2006-04-06 16:53:00

【评论】 【打印】 【字体: 】 本文链接:http://blog.pfan.cn/sword2008/12007.html

分享到:

create database study go

use study
go
create table student(
sno char(5),
sname char(10),
ssex char(2),
sage int,
sdept char(20))

insert into student values('20001','张小明','女',23,'信息系')

insert into student values('20002','n2','nan',21,'jisuanji')

insert into student values('20003','n3','nv',28,'xinxi')

insert into student values('20004','n4','nan',18,'jisuanji')
go
create table course(
cno char(2),
cname char(16),
credit decimal(2,1))

insert into course values('c1','数据库',4)
insert into course values('c2','shuxue',2.5)
insert into course values('c3','xinxixitong',4)
insert into course values('c4','yingyu',3)

create table sc(
sno char(5),
cno char(2),
grade decimal(3,0))

insert into sc values('20001','c1',91)
insert into sc values('20001','c2',92)
insert into sc values('20001','c3',93)
insert into sc values('20001','c4',94)
insert into sc values('20002','c2',81)
insert into sc values('20002','c3',80)
insert into sc values('20004','c1',70)
insert into sc values('20004','c2',71)
insert into sc values('20004','c3',72)

阅读(5087) | 评论(0)


版权声明:编程爱好者网站为此博客服务提供商,如本文牵涉到版权问题,编程爱好者网站不承担相关责任,如有版权问题请直接与本文作者联系解决。谢谢!

评论

暂无评论
您需要登录后才能评论,请 登录 或者 注册