摘要: sql - andSQLANDlinks together two or more conditional statements for increased filtering when running SQL commands.ANDhelps the developer query for very specific records while answering questions like, "I want to view all orders made by a certain customer AND made on a special date." There 阅读全文
posted @ 2013-08-08 10:56 wx_xfy6369 阅读(307) 评论(0) 推荐(0)
摘要: 刚刚在项目中遇到这样一个问题,SQL语句如下:select * from LOAN_BACK_LIBRARY where LIBRARY_ID=1 or LIB_ID=1 and STATUS=3我想要的结果的条件是:1. LIBRARY_ID=1 或者 LIB_ID=12.STATUS=3但是结果并非如此,出现了STATUS!=3的结果,但是却匹配了 LIBRARY_ID=1 or LIB_ID=1为什么呢原来这个SQL的执行是这样的:select * from LOAN_BACK_LIBRARY whereLIBRARY_ID=1orLIB_ID=1 and STATUS=3修改为:sel 阅读全文
posted @ 2013-08-08 10:55 wx_xfy6369 阅读(1280) 评论(0) 推荐(0)