注:この質問は、同じシナリオを提示する一連の質問の一部です。このシリーズの各質問には固有の解決策が含まれています。解決策が記載されている目標を満たしているかどうかを判断します。
あなたの会社は世界中の異なる地域に従業員を抱えています。
次の従業員の出席情報を格納するデータベーステーブルを作成する必要があります。
- 従業員ID
- 従業員が仕事のためにチェックインした日時
- 従業員が仕事をチェックアウトした日時
日付と時刻の情報はタイムゾーンに対応している必要があり、小数秒を格納してはいけません。
解決方法:次のTransact-SQLステートメントを実行します。

解決策は目標を満たしていますか?
正解:B
Explanation
datetime2 defines adate that is combined with a time of day that is based on 24-hour clock. datetime2 can be considered as an extension of the existing datetime type that has a larger date range, a larger default fractional precision, andoptional user-specified precision.
References: https://msdn.microsoft.com/en-us/library/bb677335.aspx