`
hq369
  • 浏览: 12214 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论
文章列表
在使用left join时,on和where条件的区别如下: 1、 on条件是在生成临时表时使用的条件,它不管on中的条件是否为真,都会返回左边表中的记录。 可以理解为,左表记录保留,右表不满足条件的填写为null 2、where条件是在临时表生成好后,再对临时表进行过滤的条件。这时已经没有left join的含义(必须返回左边表的记录)了,条件不为真的就全部过滤掉。       假设有两张表: 表1 tab1: id    size 1      10 2      20 3      30 表2 tab2: size    name 10      AAA 20   ...
web.xml文件 <database jndi-name='jdbc/testdb'> <driver type="com.microsoft.sqlserver.jdbc.SQLServerDriver"> <url>jdbc:sqlserver://localhost:1433;database=dbname;</url> <user>user</user> <password>123456</password> </dr ...
Global site tag (gtag.js) - Google Analytics