MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SQL

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
hat is the one thing we need to pay attention to when we need to use constraints?
A
Can be used with both Insert and Delete.
B
Can be used with only Insert.
C
Can only be used with the Create clause.
D
Can be used with Create, Insert and Delete.
Explanation: 

Detailed explanation-1: -You use the CONSTRAINT clause in ALTER TABLE and CREATE TABLE statements to create or delete constraints. There are two types of CONSTRAINT clauses: one for creating a constraint on a single field and one for creating a constraint on more than one field.

Detailed explanation-2: -The NOT NULL constraint can be created at either the column level or the table level.

Detailed explanation-3: -Explanation: Constraints are Primary key, Foreign Key, Unique Key, Not Null, Check, Default.

Detailed explanation-4: -A foreign key (FK) is a column or combination of columns that is used to establish and enforce a link between the data in two tables to control the data that can be stored in the foreign key table.

There is 1 question to complete.