有关ORACLE数据库的,急求答案那,各位大神帮帮忙!!
2个回答
展开全部
1、当然是采用关联结构,方便管理
2、
create table COURSES_STUDENT
(
COURSESTUDENTID NUMBER,
COURSEID NUMBER,
STUDID NUMBER
)
tablespace WB
pctfree 10
pctused 40
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
3、
3.1、需要统计每门课程有多少学生参加
SELECT *
FROM COURSES_STUDENT A, STUDENTS B
WHERE A.STUDID = B.STUDID
AND A.COURSEID = ''
3.2、需要统计每个学生选了那些课程
SELECT *
FROM COURSES_STUDENT A, COURSES B, STUDENTS C
WHERE A.COURSEID = B.COURSEID
AND A.STUDID = C.STUDID
AND C.STUDNAME = '李明'
2、
create table COURSES_STUDENT
(
COURSESTUDENTID NUMBER,
COURSEID NUMBER,
STUDID NUMBER
)
tablespace WB
pctfree 10
pctused 40
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
3、
3.1、需要统计每门课程有多少学生参加
SELECT *
FROM COURSES_STUDENT A, STUDENTS B
WHERE A.STUDID = B.STUDID
AND A.COURSEID = ''
3.2、需要统计每个学生选了那些课程
SELECT *
FROM COURSES_STUDENT A, COURSES B, STUDENTS C
WHERE A.COURSEID = B.COURSEID
AND A.STUDID = C.STUDID
AND C.STUDNAME = '李明'
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询