80.Which two statements are true regarding working with dates? (Choose two.)
A.The default internal storage of dates is in the numeric format.
B.The default internal storage of dates is in the character format.
C.The RR date format automatically calculates the century from the SYSDATE function and does not allow the user to enter the century.
D.The RR date format automatically calculates the century from the SYSDATE function but allows the user to enter the century if required.
答案:AD
解析:
官方文档如下:
DATE Data Type
The DATE data type stores date and time. Although datetimes can be represented in character or number data types, DATE has special associated properties. The hire_date column in Example 2-1 has a DATE data type.
The database stores dates internally as numbers. Dates are stored in fixed-length fields of 7 bytes each, corresponding to century, year, month, day, hour, minute, and second.
所以A正确
RR 取年份最后2位数字,
RR修饰符的作用
1.如果当前年份落在了头半个世纪(0-49)
a.如果输入的日期落在头半个世纪,RR返回当前世纪
b.如果输入的日期落在后半个世纪,RR返回前一个世纪
2.如果当前年份落在了后半个世纪(50-99)
a.如果输入的日期是头半个世纪,RR返回下一个世纪
b.如果输入的日期是后半个世纪,RR返回当前世纪
可以手动输入D正确
A.The default internal storage of dates is in the numeric format.
B.The default internal storage of dates is in the character format.
C.The RR date format automatically calculates the century from the SYSDATE function and does not allow the user to enter the century.
D.The RR date format automatically calculates the century from the SYSDATE function but allows the user to enter the century if required.
答案:AD
解析:
官方文档如下:
DATE Data Type
The DATE data type stores date and time. Although datetimes can be represented in character or number data types, DATE has special associated properties. The hire_date column in Example 2-1 has a DATE data type.
The database stores dates internally as numbers. Dates are stored in fixed-length fields of 7 bytes each, corresponding to century, year, month, day, hour, minute, and second.
所以A正确
RR 取年份最后2位数字,
RR修饰符的作用
1.如果当前年份落在了头半个世纪(0-49)
a.如果输入的日期落在头半个世纪,RR返回当前世纪
b.如果输入的日期落在后半个世纪,RR返回前一个世纪
2.如果当前年份落在了后半个世纪(50-99)
a.如果输入的日期是头半个世纪,RR返回下一个世纪
b.如果输入的日期是后半个世纪,RR返回当前世纪
可以手动输入D正确