Microsoft SQL ServerとMicrosoft Azure SQLデータベース用のデータベースアプリケーションを開発します。 例外を発生させ、実行をCATCHブロックに転送する必要があります。 例外が次の形式で出力を返すようにする必要があります。 メッセージ51000、レベル16、状態1、行1 レコードは存在しません。 どのTransact-SQL文を実行する必要がありますか?
正解:B
The following example shows how to use the THROW statement to raise an exception. THROW 51000, 'The record does not exist.', 1; Here is the result set. Msg 51000, Level 16, State 1, Line 1 The record does not exist. References: https://docs.microsoft.com/en-us/sql/t-sql/language-elements/throw-transact-sql?view=sql-server-2017