sqlite 获取用户消息列表多表查询语句
程序员文章站
2022-05-15 23:45:50
...
很少写多表查询的语句,请教宏利得到的
select m.msg as msg_content, m.type as msg_type, m.time as msg_time, m.state as msg_state, m.has_read as has_read, u.id as friend_user_id,u.name as friend_user_name,u.avatar as friend_user_avatar from message as m, user as u where m.user_id = ? and m.friend_user_id = u.id group by m.friend_user_id order by m.time desc
上一篇: 三层——vb.net版
下一篇: vue3项目中使用i18n国际化