随笔分类 -  sql

摘要:碰到了在service的代码中执行sql,和在数据库客户端执行sql执行结果不一致的问题。 sql如下 <select id="getFilterByExample" resultMap="PindanExtendResultMap"> select p.*,u.realname realname, 阅读全文
posted @ 2017-02-15 15:09 王自强 阅读(1063) 评论(0) 推荐(0)
摘要:联结的语法: ... from table1 inner|left|right join table2 on condition 内外联结的区别: 内联结将去除所有不符合条件condition的记录,外联结将保留部分不符合condition的记录; 左联结将保留左边表table1的记录,此时右边表t 阅读全文
posted @ 2016-09-04 21:18 王自强 阅读(2893) 评论(0) 推荐(0)