Index, Unique Key, Primary Key – Quiz

For each question below, select the best answer. To select the best answer, click on the circle located on the left of this answer. When all questions are answered, click on the Submit button

Question 1

In a table, there can be only one:
unique key
column
primary key
index

Question 2

The creation of which of the following object can trigger the ordering of rows in the table?:
unique key
column
primary key
index

Question 3

Which of the following objects is not preventing the addition of duplicate values in the table:
unique key
primary key
index

Question 4

Which of the following syntax is correct when creating an index?:
create index ix_clients_1 in clients(first_name, last_name)
create index ix_clients_1 with clients(first_name, last_name)
create index ix_clients_1 on clients(first_name, last_name)

Question 5

When applying an index on a table, updates on this table can be?:
slower.
faster.
neither faster nor slower, it has no influence on the speed of the update.

Question 6

Which of the following syntax is correct to create a unique index?:
create unique index ux_clients_email_address on clients (email_address)
create index ux_clients_email_address on clients (email_address) unique
create index ux_clients_email_address from clients (email_address) unique
create index ux_clients_email_address on clients (email_address unique)

Question 7

Which of the following syntax is correct to create a primary key?:
alter table clients add primary key id
alter table clients add primary key(id)
alter table clients primary key(id)

 

 

Once you have completed the quiz, calculated your score and reviewed your answers, I invite you to go to the next lesson: foreign key in SQL.
 
Share on:

Something not clear? Ask your question here:

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 
 

Author:
Last udpated: September 10, 2017
Created: November 11, 2014