powered by simpleCommunicator - 2.0.49     © 2025 Programmizd 02
Форумы / Сертификация и обучение [игнор отключен] [закрыт для гостей] / 70-229: AFTER или INSTEAD OF ?
3 сообщений из 3, страница 1 из 1
70-229: AFTER или INSTEAD OF ?
    #32099019
Ihor Bobak
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Кто как считает, А или D ?

=========================================================

You are a database developer for an insurance company.
Information about the company's insurance policies is stored
in a SQL Server 2000 database. You create a table named policy
for this database by using the script shown below:

CREATE TABLE Policy
(
PolicyNumber int NOT NULL DEFAULT (0),
InsuredLastName char (30) NOT NULL,
InsuredFirstName char (20) NOT NULL,
InsuredBirthDate dattime NOT NULL,
PolicyDate datetime NOT NULL,
FaceAmount money NOT NULL,
CONSTRAINT PK_Policy PRIMARY KEY (PolicyNumber)
)

Each time the company sells a new policy, the policy must be assigned a
unique policy number. The database must assign a new policy number when
a new policy is entered. What should you do?

A. Create an INSTEAD OF INSERT trigger to generate a new policy number,
and include the policy number in the data instead into the table.
B. Create an INSTEAD OF UPDATE trigger to generate a new policy number,
and include the policy number in the data inserted into the table.
C. Create an AFTER UPDATE trigger to generate a new policy number,
and include the policy number in the data inserted into the table.
D. Replace the DEFAULT constraint with a AFTER INSERT trigger that generates
a new policy number and includes the policy number in the data inserted into
the table.

=========================================================
...
Рейтинг: 0 / 0
70-229: AFTER или INSTEAD OF ?
    #32099034
Фотография snake
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Думаю что A, потому как All referential cascade actions and constraint checks also must succeed before AFTER trigger executes
...
Рейтинг: 0 / 0
70-229: AFTER или INSTEAD OF ?
    #32099078
Фотография jimmers
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Методом исключения А.
...
Рейтинг: 0 / 0
3 сообщений из 3, страница 1 из 1
Форумы / Сертификация и обучение [игнор отключен] [закрыт для гостей] / 70-229: AFTER или INSTEAD OF ?
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]