mybatis关联查询赋值问题? 10
mybatis做关联查询一对一怎么把一个表的字段的值赋值到另一个表的字段上不是,是赋值到另一个字段SELECTme.ID,me.photo_url,u.IDASu_id,...
mybatis做关联查询一对一怎么把一个表的字段的值赋值到另一个表的字段上
不是,是赋值到另一个字段
SELECT me.ID, me.photo_url, u.ID AS u_id,
u.photo_url AS u_photo_url FROM t_group AS g JOIN t_member AS me ON
g.`ID` = me.group_id LEFT JOIN s_user AS u ON u.`ID` = me.`user_id`
where me.t_id = 11932
就是把u.photo_url赋值到me.photo_url,意思让u的实体类头像给me的实体类的头像赋值,两个值一样 展开
不是,是赋值到另一个字段
SELECT me.ID, me.photo_url, u.ID AS u_id,
u.photo_url AS u_photo_url FROM t_group AS g JOIN t_member AS me ON
g.`ID` = me.group_id LEFT JOIN s_user AS u ON u.`ID` = me.`user_id`
where me.t_id = 11932
就是把u.photo_url赋值到me.photo_url,意思让u的实体类头像给me的实体类的头像赋值,两个值一样 展开
2个回答
2016-12-07
展开全部
举个具体的例子来说明一下
~~~~~~~
~~~~~~~
追问
请看一下我的补充问题
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询