1,sql语句多表联查
select
userinfo.user_di,userinfo.user_name,dep.dep_name,sex.sex_name
from
userinfo,dep,sex
where
userinfo.user_dep=dep.dep_id
and
userinfo.user_sex=sex.sex_id,
这样就可以查询到表userinfo,dep,sex的数据了
1,sql语句多表联查
select
userinfo.user_di,userinfo.user_name,dep.dep_name,sex.sex_name
from
userinfo,dep,sex
where
userinfo.user_dep=dep.dep_id
and
userinfo.user_sex=sex.sex_id,
这样就可以查询到表userinfo,dep,sex的数据了