exam questions

Exam 70-767 All Questions

View all questions & answers for the 70-767 exam

Exam 70-767 topic 1 question 19 discussion

Actual exam question from Microsoft's 70-767
Question #: 19
Topic #: 1
[All 70-767 Questions]

HOTSPOT -
You manage a data warehouse in a Microsoft SQL Server instance. Company employee information is imported from the human resources system to a table named Employee in the data warehouse instance. The Employee table was created by running the query shown in the Employee Schema exhibit. (Click the
Exhibit button.)

The personal identification number is stored in a column named EmployeeSSN. All values in the EmployeeSSN column must be unique.
When importing employee data, you receive the error message shown in the SQL Error exhibit. (Click the Exhibit button.).

You determine that the Transact-SQL statement shown in the Data Load exhibit is the cause of the error. (Click the Exhibit button.)

You remove the constraint on the EmployeeSSN column. You need to ensure that values in the EmployeeSSN column are unique.
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
With the ANSI standards SQL:92, SQL:1999 and SQL:2003, an UNIQUE constraint must disallow duplicate non-NULL values but accept multiple NULL values.
In the Microsoft world of SQL Server however, a single NULL is allowed but multiple NULLs are not.
From SQL Server 2008, you can define a unique filtered index based on a predicate that excludes NULLs.
References: https://stackoverflow.com/questions/767657/how-do-i-create-a-unique-constraint-that-also-allows-nulls

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
JHJHJHJHJ
4 years, 5 months ago
No, Yes is the correct answer
upvoted 1 times
...
RidaZaki
4 years, 7 months ago
It was this link : https://www.itprotoday.com/sql-server/whats-good-use-unique-filtered-index
upvoted 3 times
...
RidaZaki
4 years, 7 months ago
Have a look: https://blog.sqlauthority.com/2008/09/01/sql-server-2008-introduction-to-filtered-index-improve-performance-with-filtered-index/#:~:text=Filtered%20Index%20is%20a%20new,compared%20with%20full%2Dtable%20indexes.
upvoted 2 times
...
Anette
4 years, 10 months ago
I ma wondering why isn't it YES for both? :/
upvoted 1 times
lahmed
4 years, 10 months ago
The table has already a clustered index because EmployeeID is an identity column and as we know a table can't have more then one clustered index
upvoted 6 times
Anette
4 years, 10 months ago
yes, you are right, thank you lahmed
upvoted 4 times
...
...
Slava_bcd81
4 years, 8 months ago
if we make that clustered index there will be no nulls, but the table should have nulls
upvoted 2 times
Hoglet
4 years, 6 months ago
This is the real reason. You can always change the existing Primary Key to be non-clustered, but it wouldn't help in the case.
upvoted 1 times
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...