DBMS-1

DBMS-1

University

10 Qs

quiz-placeholder

Similar activities

DDL SQL

DDL SQL

University

7 Qs

Table Formatting

Table Formatting

KG - University

14 Qs

sql fundamendals

sql fundamendals

University

10 Qs

Chapter : 9 Working with tables

Chapter : 9 Working with tables

5th Grade - University

15 Qs

SQL MCQ

SQL MCQ

University

9 Qs

Kaun Banega Crorepati

Kaun Banega Crorepati

University

10 Qs

SYS 1591

SYS 1591

University

10 Qs

DBMS 1

DBMS 1

University

10 Qs

DBMS-1

DBMS-1

Assessment

Quiz

Computers

University

Hard

Created by

RAVINDER B

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following is not allowed when a table already has data in it?

ALTER TABLE ADD COLUMN

ALTER TABLE DROP COLUMN

ALTER TABLE RENAME COLUMN

ALTER TABLE MODIFY COLUMN data type

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What does the following SQL command do?
TRUNCATE TABLE employees;

Deletes all rows and can't be rolled back

Deletes all rows and can be rolled back

Deletes the table structure and data

Deletes rows based on WHERE clause

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What will be the result of this query?
SELECT * FROM students WHERE marks = NULL;

All rows with marks = NULL

Syntax error

No rows selected

Only NULL rows returned

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which DML command can insert multiple rows in one statement?

INSERT INTO ... VALUES

INSERT ALL

INSERT EACH

APPEND ROWS

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which query will give you the 3rd highest salary from a salaries table?

SELECT salary FROM salaries ORDER BY salary DESC LIMIT 3;

SELECT MAX(salary) FROM salaries LIMIT 2,1;

SELECT salary FROM (SELECT DISTINCT salary FROM salaries ORDER BY salary DESC LIMIT 2,1);

SELECT salary FROM salaries OFFSET 2 ROWS FETCH NEXT 1 ROW ONLY;

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following commands creates a new copy of a table with only structure and no data?

CREATE TABLE new_table LIKE old_table;

CREATE TABLE new_table AS SELECT * FROM old_table;

SELECT * INTO new_table FROM old_table;

CREATE TABLE new_table FROM old_table;

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the effect of this command: DELETE FROM orders WHERE 1=1;

Deletes no rows

Deletes all rows

Deletes only rows with ID=1

Causes syntax error

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?