求sql大神速答谢谢
1个回答
展开全部
create database hospital;
use hospital
go
create table patient(
PatientNo char(8) primary key,
Name char(20),
Sex char(1),
Age int
)
use hospital
go
create table patient(
PatientNo char(8) primary key,
Name char(20),
Sex char(1),
Age int
)
追问
求234题大神
追答
1.create database hospital;
2.use hospital
go
create table patient(PatientNo char(8) not null primary key,
Name char(20),
Sex char(1),
Age int)
create table doctor(doctorNo char(4) not null primary key,
Name char(20),
Dep char(20),
RankName char(20))
create table sick(
PatientNo char(8),
doctorNo char(4),
DiaDate datetime,
Name char(50)
)
3.insert into patient values('20132033','肖志强','男','68')
4. create view sick_view as
select a.PatientNo,a.Name,b.DiaDate,b.Name from patient a
left join sick b
on a.PatientNo=b.PatientNo
5.select a.name,b.DiaDate,b.Name from patient a
left join sick b
on a.PatientNo=b.PatientNo
where a.age>=60
and a.age<=70
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询