QuestionQ28

VerifiedCreating and Managing Tables

You need to create an employees table where the values in columns EMPLOYEES_ID and LOGIN_ID must be unique and not null. Which two SQL statements would create the required table?

Question Image

Choose two
Explanation

A composite primary key enforces both uniqueness of the employee_id/login_id combination and non-null values for each key column. Alternatively, declaring both columns NOT NULL and applying a composite UNIQUE constraint enforces the same required properties.

Community Discussion

No comments yet. Be the first to start the discussion!