多个表中的字段值
问题描述:
大家好!
有人可以告诉我,这里的问题是什么?我的数据未显示在下面的查询中,它仅显示字段名称
我想显示字段值
hi to all!
can some one tell me that whats the problem here my data is not displaying in the query below it shows the name of fields only
i want to display the field values
select sec_modules.modname_vc, sec_roles.rolename_vc, sec_functions.functionname_vc
from sec_umrf_details
left join sec_mrf_details on sec_mrf_details.mrfno_nu = sec_umrf_details.mrfno_nu
left join sec_modules on sec_modules.modid_int = sec_mrf_details.modid_int
left join sec_roles on sec_roles.roleid_int = sec_mrf_details.roleid_int
left join sec_functions on sec_functions.fnid_int = sec_mrf_details.fnid_int
where sec_mrf_details.mrfno_nu = 1
答
我将尝试进行内部联接,以查看是否获得联接匹配的值,并且我将删除第一个表,因为实际上并没有从那里获取任何数据.数据必须与mrf表中的值匹配,因此只需从那里获取它即可.一旦有了可以使用的简单查询,就可以开始使其变得更复杂.
I would try an inner join to see if you get the values where the join matches, and I''d remove the first table, as you don''t actually grab any data from there. The data would have to match the value in the mrf table, so just grab it from there. Once you have a simpler query that works, you can start to make it more complex.