一、原题
You are currently located in Singapore and have connected to a remote database in Chicago.
You issue the following command:
SQL> SELECT ROUND(SYSDATE-promo_begin_date,0)
FROM promotions
WHERE (SYSDATE-promo_begin_date)/365 > 2;
PROMOTIONS is the public synonym for the public database link for the PROMOTIONS table.
What is the outcome?
A. an error because the ROUND function specified is invalid.
B. an error because the WHERE condition specified is invalid.
C. number of days since the promo started based on the current Chicago date and time.
D. number of days since the promo started based on the current Singapore date and time.
答案:C
二、题目翻译You issue the following command:
SQL> SELECT ROUND(SYSDATE-promo_begin_date,0)
FROM promotions
WHERE (SYSDATE-promo_begin_date)/365 > 2;
PROMOTIONS is the public synonym for the public database link for the PROMOTIONS table.
What is the outcome?
A. an error because the ROUND function specified is invalid.
B. an error because the WHERE condition specified is invalid.
C. number of days since the promo started based on the current Chicago date and time.
D. number of days since the promo started based on the current Singapore date and time.
答案:C
在Singapore(新加坡),连接到位于Chicago的远程数据库,
执行下面的命令:
PROMOTIONS是一个public synonym,通过public database link连接到PROMOTIONS表。
执行下面的命令,结果是什么?
A. 报错,因为ROUND函数无效。
B. 报错,因为WHERE条件无效。
C. 基于当前Chicago的日期和时间promo开始的天数。
D. 基于当前Singapore的日期和时间promo开始的天数。
三、题目解析执行下面的命令:
PROMOTIONS是一个public synonym,通过public database link连接到PROMOTIONS表。
执行下面的命令,结果是什么?
A. 报错,因为ROUND函数无效。
B. 报错,因为WHERE条件无效。
C. 基于当前Chicago的日期和时间promo开始的天数。
D. 基于当前Singapore的日期和时间promo开始的天数。
A、B选项不正确,这个SQL会执行成功。
C选项正确,因为sysdate获取的是远程服务器时间,所以D选项不正确。
C选项正确,因为sysdate获取的是远程服务器时间,所以D选项不正确。