查看表BOOKS_TRANSACTIONS的描述
Name Null? Type
-------------------------------------------------- TRANSACTION_ID NOT NULL VARCHAR2(6)
TRANSACTION_TYPE VARCHAR2(3)
BORROWED_DATE DATE
BOOK_ID ARCHAR2(6)
MEMBER_ID VARCHAR2(6)
查看如下一部分SQL:SELECT * FROM books_transctions 哪两个WHERE子句会返回相同的查询结果。
A.WHERE borrowed_date = SYSDATE AND transaction_type= 'RM' OR member_id IN ('A101','A102' ) ;
B.WHERE (borrowed_date = SYSDATE AND transaction_type= 'RM' ) OR member_id IN ('A101','A102' );
C.WHERE borrowed_date = SYSDATE AND (transaction_type= 'RM' OR member_id IN ('A101','A102' ) );
D.WHERE borrowed_date = SYSDATE AND (transaction_type= 'RM' AND ( member_id= 'A101' OR member_id = 'A102' ) );
E.WHERE borrowed_date = SYSDATE AND (transaction_type= 'RM' AND member_id='A101' OR member_id = 'A102') );
戳阅读原文,立即参与
本文分享自微信公众号 - 墨天轮(enmocs)。
如有侵权,请联系 support@oschina.cn 删除。
本文参与“OSC源创计划”,欢迎正在阅读的你也加入,一起分享。