M
mxiang
Unregistered / Unconfirmed
GUEST, unregistred user!
表1 Employee
列 depart_id,job_id,birth_date为日期 查询条件为month(birth_date)=4
表2 depart
列 depart_id,depart_name
表3 job
job_id,job_name
下面的当某条记录的depart_id或job_id 为空时,就查询不出那条记录
怎么写只要是满足month(birth_date)=4,不管depart_id或job_id是否为空都查询出来
数据库为ACCESS
select a.birth_date,b.depart_name,c.job_name from Employee as a,depart as b ,job as c where a.depart_id = b.depart_id and a.job_id =c.job_id and month(a.birth_date) = 4
列 depart_id,job_id,birth_date为日期 查询条件为month(birth_date)=4
表2 depart
列 depart_id,depart_name
表3 job
job_id,job_name
下面的当某条记录的depart_id或job_id 为空时,就查询不出那条记录
怎么写只要是满足month(birth_date)=4,不管depart_id或job_id是否为空都查询出来
数据库为ACCESS
select a.birth_date,b.depart_name,c.job_name from Employee as a,depart as b ,job as c where a.depart_id = b.depart_id and a.job_id =c.job_id and month(a.birth_date) = 4