【2019年8月版】OCP 071認證考試原題-第39題

Choose two

Exanine the desatption of the BOOKS_TRANSACTIONS table

Name Null? Type


TRANSACTION_ID NOT NULL VARCHAR2(6)

TRANSACTION_TYPE VARCHAR2(3)

BORROWED_DATE DATE

BOOK_ID ARCHAR2(6)

MEMBER_ID VARCHAR2(6)

Examine this partial SQL statement:

SELECT * FROM books_transctions;

Which two WHERE condtions give the same resut?

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' AND member_id='A101' OR

member_id = 'A102') );

D) WHERE (borrowed_date = SYSDATE AND transaction_type= 'RM' ) OR member_id IN

('A101','A102' );

E) WHERE borrowed_date = SYSDATE AND (transaction_type= 'RM' AND ( member_id= 'A101' OR

member_id = 'A102' ) );

Answer::BD

(解析:考的是 and 和 or 的優先級。)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章