SQL and Database Quiz

SQL and Database Quiz

University

15 Qs

quiz-placeholder

Similar activities

Sử dụng Word (51 - 70)

Sử dụng Word (51 - 70)

University

20 Qs

Unit 24 - Java Basics

Unit 24 - Java Basics

University

10 Qs

Computer Basics: Basic Parts of a Computer Quiz By Mr. B

Computer Basics: Basic Parts of a Computer Quiz By Mr. B

12th Grade - University

17 Qs

Chapter 2 System Planning

Chapter 2 System Planning

University

11 Qs

basisdata1

basisdata1

University

20 Qs

Materi 1 SI (Gambaran Umum SI & TI)

Materi 1 SI (Gambaran Umum SI & TI)

University

10 Qs

JAVA SWING 1

JAVA SWING 1

University

15 Qs

ប្រឡងឆមាសលើកទី១ ថ្នាក់ទី១១

ប្រឡងឆមាសលើកទី១ ថ្នាក់ទី១១

11th Grade - University

15 Qs

SQL and Database Quiz

SQL and Database Quiz

Assessment

Quiz

Computers

University

Medium

Created by

Pavan Madhvesh

Used 6+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which command is used to rollback the last transaction?

COMMIT;

ROLLBACK;

SAVEPOINT;

UNDO;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How to add a primary key constraint to an existing table?

ALTER TABLE Employee ADD PRIMARY KEY (EMPNO);

ALTER Employee ADD PRIMARY KEY (EMPNO);

ADD PRIMARY KEY TO Employee (EMPNO);

ALTER Employee TABLE ADD PRIMARY KEY (EMPNO);

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How to add a NOT NULL constraint to a column?

ALTER TABLE Employee ADD CONSTRAINT NOT NULL (EMPNO);

ALTER TABLE Employee MODIFY EMPNO NOT NULL;

ALTER TABLE Employee ADD NOT NULL (EMPNO);

ALTER Employee MODIFY COLUMN EMPNO NOT NULL;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which command is used to insert a new record into a table?

INSERT INTO Employee VALUES (101, 'John', 'Manager', 1001, 5000, NULL);

ADD INTO Employee VALUES (101, 'John', 'Manager', 1001, 5000, NULL);

INSERT INTO Employee SET (101, 'John', 'Manager', 1001, 5000, NULL);

INSERT INTO Employee SET VALUES (101, 'John', 'Manager', 1001, 5000, NULL);

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How to add a new column to an existing table?

ALTER TABLE Employee ADD COLUMN commission DECIMAL(10,2);

ALTER Employee ADD COLUMN commission DECIMAL(10,2);

ALTER TABLE Employee MODIFY commission DECIMAL(10,2);

ALTER Employee TABLE ADD COLUMN commission DECIMAL(10,2);

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How to update the details of a column in a table?

UPDATE Employee SET JOB = 'Developer' WHERE EMPNO = 101;

MODIFY Employee SET JOB = 'Developer' WHERE EMPNO = 101;

CHANGE Employee SET JOB = 'Developer' WHERE EMPNO = 101;

ALTER Employee SET JOB = 'Developer' WHERE EMPNO = 101;

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How to rename a column in a table?

ALTER TABLE Employee RENAME COLUMN commission TO bonus;

CHANGE Employee RENAME COLUMN commission TO bonus;

MODIFY Employee RENAME COLUMN commission TO bonus;

RENAME Employee RENAME COLUMN commission TO bonus;

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?