1z0-061 Exam QuestionsBrowse all questions from this exam

1z0-061 Exam - Question 3


You want to create a table employees in which the values of columns EMPLOYEES_ID and LOGIN_ID must be unique and not null. Which two SQL statements would create the required table?

Show Answer
Correct Answer: AE

To create the required table where both EMPLOYEE_ID and LOGIN_ID are unique and not null, we need to ensure that these columns are explicitly set as UNIQUE and NOT NULL. Option A specifies a PRIMARY KEY on the combination of EMPLOYEE_ID and LOGIN_ID, which inherently means these columns will be unique and cannot be null. Option E declares the EMPLOYEE_ID and LOGIN_ID columns with NOT NULL constraints separately and also creates a UNIQUE constraint on them. These two options ensure the constraints required for the table are properly enforced.

Discussion

4 comments
Sign in to comment
luizyto
Aug 19, 2019

I don't see option F

rafa_vlc
Jan 14, 2020

There are 2 Ds so F is the last one.

Fatthalla
Mar 24, 2020

[email protected] correct this please

Blob44
Nov 21, 2022

AE If you take the double D in account. NOT NULL constraints must be declared INLINE BCD don't have the not null or unique applied to the desired columns