次のTransact-SQLステートメントを使用してテーブルを作成します。

DisplayInformationという名前の列が1つある結果セットを返す必要があります。 Name値がNOT NULLの場合、結果セットにName値が含まれている必要があります。そうでない場合は、結果セットにSubName値が含まれている必要があります。
正しいTransact-SQLの一部は、以下のアンサーエリアで提供されています。 回答エリアに問題を解決し、記載された目標や要件を満たすコードを入力します。 提供されているコード内に、その下にコードを追加することができます。


[構文の確認]ボタンを使用して作業内容を確認します。 構文やスペルの誤りは、行と文字の位置によって報告されます。
正解:
SELECT IIF (Name IS NOT NULL, Name, SubName)
Explanation:
Update line 1 to get the following:
SELECT IIF (Name IS NOT NULL, Name, SubName)
FROM Products;
IIF returns one of two values, depending on whether the Boolean expression evaluates to true or false in SQL Server.
Syntax: IIF ( boolean_expression, true_value, false_value )
If the value of expression is NULL, IS NULL returns TRUE; otherwise, it returns FALSE.
If the value of expression is NULL,IS NOT NULL returns FALSE; otherwise, it returns TRUE.
To determine whether an expression is NULL, use IS NULL or IS NOT NULL instead of comparison operators (such as = or !=). Comparison operators return UNKNOWN when either or both arguments are NULL References:https://msdn.microsoft.com/en-us/library/hh213574.aspx
https://msdn.microsoft.com/en-us/library/ms188795.aspx