关于SQl语句的问题 求大神解答 select Applicant_name,HEAD_name,SIGN_name from
(
select hum_list.first_name Applicant_name from hum_list,s_zhgl_Send_meal where hum_list.human_id=s_zhgl_Send_meal.Applicant
union all
select hum_list.first_name HEAD_name from hum_list,s_zhgl_Send_meal where hum_list.human_id=s_zhgl_Send_meal.HEAD
union all
select hum_list.first_name SIGN_name from hum_list,s_zhgl_Send_meal where hum_list.human_id=s_zhgl_Send_meal.Sign
)
运行报错:"SIGN_name"标识符无效
select * from
(
select hum_list.first_name Applicant_name from hum_list,s_zhgl_Send_meal where hum_list.human_id=s_zhgl_Send_meal.Applicant
union all
select hum_list.first_name HEAD_name from hum_list,s_zhgl_Send_meal where hum_list.human_id=s_zhgl_Send_meal.HEAD
union all
select hum_list.first_name SIGN_name from hum_list,s_zhgl_Send_meal where hum_list.human_id=s_zhgl_Send_meal.Sign
)
运行无错误 但是我需要Applicant_name,HEAD_name,SIGN_name 三个字段 运行结果只有Applicant_name一个字段
请教各大神应该怎么改
分享到:更多
------解决方案--------------------
select a.Applicant_name,a.HEAD_name,a.SIGN_name from
(
select hum_list.first_name Applicant_name from hum_list,s_zhgl_Send_meal where hum_list.human_id=s_zhgl_Send_meal.Applicant
union all
select hum_list.first_name HEAD_name from hum_lis