constraints

constraints

University

17 Qs

quiz-placeholder

Similar activities

DBMS QUIZ-1

DBMS QUIZ-1

University

20 Qs

5.3.0 Database Schema Quizizz

5.3.0 Database Schema Quizizz

University

14 Qs

Advanced Database Development Part 2

Advanced Database Development Part 2

University

14 Qs

SQL Quiz

SQL Quiz

University

19 Qs

PostgreSQL Quiz day12

PostgreSQL Quiz day12

University

12 Qs

Comandos DDL

Comandos DDL

University

20 Qs

ICT285 PASS Week 4

ICT285 PASS Week 4

University

19 Qs

Database Design

Database Design

University

16 Qs

constraints

constraints

Assessment

Quiz

Computers

University

Medium

Created by

NV CHALLA

Used 1+ times

FREE Resource

17 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Q1. What does a primary key do?

A primary key is used to store large amounts of data.
A primary key uniquely identifies each record in a database table.
A primary key can be duplicated across records.
A primary key is a type of foreign key.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Q2. Which of the following constraints prevents NULL values in a column?

DEFAULT
NOT NULL
PRIMARY KEY
UNIQUE

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Q3. Which of the following constraints can be used to provide a default value for a column?

DEFAULT constraint
PRIMARY KEY constraint
CHECK constraint
UNIQUE constraint

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Q4. Which of the following is TRUE about UNIQUE constraint?

The UNIQUE constraint can be applied to multiple columns but allows one duplicate value.
The UNIQUE constraint allows duplicate values in a column.
The UNIQUE constraint prevents duplicate values in a column.
The UNIQUE constraint is only applicable to primary keys.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Q5. Which constraint ensures referential integrity between two tables?

Primary key constraint
Unique constraint
Check constraint
Foreign key constraint

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Q6. What happens if we try to insert a NULL into a NOT NULL column?

The operation will succeed without any issues.
A default value will be inserted instead.
The operation will fail with an error.
The NULL value will be converted to an empty string.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Q7. Which statement correctly creates a table with a default value?

CREATE TABLE example (id INT, name VARCHAR(100) DEFAULT 'unknown');
CREATE TABLE example (id INT DEFAULT NULL, name VARCHAR(100));
CREATE TABLE example (id INT DEFAULT 1, name TEXT);

CREATE TABLE example (id INT DEFAULT 100, name VARCHAR(100));

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?