首先确定你的电脑已经成功安装JDK
1. 在SQL server 2008中创建一个数据库命名为:st
新建三个表,分别为:Student SC Course 代码如下:
Create table Student
(
Sno char(9),
Sname char(20),
Ssex char(2),
Sage smallint,
Sdept char(20),
primary key (Sno)
);
create table Course
(
Cno char(4),
Cname char(40),
Cpno char(4),
Ccredit smallint,
primary key (Cno)
);
create table SC
(
Sno char(9),
Cno char(4),
Grade smallint,
primary key (Sno, Cno),
foreign key (Sno) references Student(Sno),
foreign key (Cno) references Course(Cno)
);
创建一个登录名 登陆名: ssaa ,密码设置为空
<