NEW
Font size
WorksheetsDBMS Quizz
Total questions: 24
Worksheet time: 12mins
Which command is used to remove a relation from an SQL?
Drop table
Delete
Purge
Remove
Which of the following is not a DDL command?
TRUNCATE
ALTER
CREATE
UPDATE
Which of the following are TCL commands?
COMMIT and ROLLBACK
UPDATE and TRUNCATE
SELECT and INSERT
GRANT and REVOKE
Which statement is used to delete all rows in a table without having the action logged?
DELETE
REMOVE
DROP
TRUNCATE
SQL Views are also known as
Simple tables
Virtual tables
Complex tables
Actual Tables
How many Primary keys can have in a table?
Only 1
Only 2
Depends on no of Columns
Depends on DBA
In which of the following cases a DML statement is not executed?
When existing rows are modified.
When a table is deleted.
When some rows are deleted.
All of the above
Which data manipulation command is used to combines the records from one or more tables?
SELECT
PROJECT
JOIN
PRODUCT
A command that lets you change one or more field in a table is:
INSERT
MODIFY
LOOK-UP
All of the above
The SQL statement:
SELECT ROUND (65.726, -1) FROM DUAL;
is illegal
garbage
726
70
_________ command makes the updates performed by the transaction permanent in the database?
ROLLBACK
COMMIT
TRUNCATE
DELETE
Which command is used to change the definition of a table in SQL?
CREATE
UPDATE
ALTER
SELECT
Which statement is used to get all data from the student table whose name starts with p?
SELECT * FROM student WHERE name LIKE '%p%';
SELECT * FROM student WHERE name LIKE 'p%';
SELECT * FROM student WHERE name LIKE '_p%';
SELECT * FROM student WHERE name LIKE '%p';
Which clause is used to retrieve a unique element from the table?
SELECT UNIQUE
SELECT DISTINCT
Both A) and B)
None of the above
Which function combines the two different columns?
ADD
MERGE
CONCAT
None of the above
SQL INSERT command is used to insert a –
Single or Multiple record
Single or Multiple database
Single or Multiple table
None of the above
In order to insert a row directly in the table, which command is used?
INSERT IN
INSERT INSIDE
INSERT UNDER
INSERT INTO
In order to delete duplicate rows from the table, which keyword is used?
DELETE
DISTINCT
FROM
WHERE
Commands that comes under DDL is/are –
CREATE
DROP
TRUNCATE
All of the above
Command that comes under DML is/are –
ROLLBACK
GRANT
UPDATE
All of the above
Command that comes under DCL is/are -
GRANT
REVOKE
Both A. and B.
None of the above
Commands that come under TCL is/are -
COMMIT
ROLLBACK
SAVEPOINT
All of the above
What does the following statement in SQL do?
DROP TABLE student;
Deletes a table called student.
Creates a table called student.
Check if there is a table called student.
None of the above.
What does the following code snippet do?
DELETE FROM STUDENTS WHERE AGE = 16; ROLLBACK;
Performs an undo operation on the delete operation.
Deletes the rows from the table where AGE = 16
Deletes the entire table
None of the above
