SQL

Create an engaging and informative image depicting a person interacting with a computer, surrounded by SQL code snippets and database icons, showcasing the theme of learning SQL.

Ultimate SQL Mastery Quiz

Test your knowledge of SQL with our comprehensive quiz designed for aspiring database professionals and enthusiasts! Dive deep into the world of Structured Query Language and see how well you understand its concepts and commands.

Features:

  • Challenging questions covering various SQL topics.
  • Multiple choice format for easy answering.
  • Immediate feedback on your performance.
26 Questions6 MinutesCreated by QueryMaster247
What is the full form of SQL?
Structured Query List
Structure Query Language
Sample Query Language
None of these.
Which of the following is not a valid SQL type?
FLOAT
NUMERIC
DECIMAL
CHARACTER
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
Which datatype can store unstructured data in a column?
CHAR
RAW
NUMERIC
VARCHAR
Which of the following is not Constraint in SQL?
Primary Key
NOT NULL
CHECK
UNION
Which of the following is not a valid aggregate function?
COUNT
COMPUTE
SUM
MAX
Which of the following is true about the HAVING clause?
Similar to the WHERE clause but is used for columns rather than groups.
Similar to WHERE clause but is used for rows rather than columns.
Similar to WHERE clause but is used for groups rather than rows.
Acts exactly like a WHERE clause
Which command is used to change the definition of a table in SQL?
CREATE
UPDATE
ALTER
SELECT
Which of the following is the correct order of a SQL statement?
SELECT, GROUP BY, WHERE, HAVING
SELECT, WHERE, GROUP BY, HAVING
SELECT, HAVING, WHERE, GROUP BY
SELECT, WHERE, HAVING, GROUP BY
What is the difference between a PRIMARY KEY and a UNIQUE KEY?
Primary key can store null value, whereas a unique key cannot store null value.
We can have only one primary key in a table while we can have multiple unique keys
Primary key cannot be a date variable whereas unique key can be
None of these
Which of the following are the synonyms for Column and ROW of a table? (1)Row = [Tuple, Record] (2) Column = [Field, Attribute] (3) Row = [Tuple, Attribute] (4) Columns = [Field, Record]
1 and 2
3 and 4
Only 1
Only 2
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%';
DML triggers in SQL Server is applicable to _____________
Update
Delete
Insert
All of the mentioned
What does SQL is used to perform operations on?
Update Records
Insert Records
Both A and B
None of the above
What is the work of CREATE command?
Using this command, you can remove or erase recorded information from a database table.
It enables you to create new databases, tables, table views, and other objects using this command.
Inserting records or data into the database tables is accomplished with this command. In addition to inserting records in single rows, we can insert records in multiple rows as well.
A single or multiple rows can be accessed using this command from one or more tables of a database. Using the WHERE clause with this command is also possible
Here which of the following displays the unique values of the column? SELECT ________ dept_name FROM instructor;
All
From
Distinct
Name
The query given below will not give an error. Which one of the following has to be replaced to get the desired output? SELECT ID, name, dept name, salary * 1.1 WHERE instructor;
Salary*1.1
ID
Where
Instructor
This Query can be replaced by which one of the following? SELECT name, course_id FROM instructor, teaches WHERE instructor_ID= teaches_ID;
Select name,course_id from teaches,instructor where instructor_id=course_id;
Select name, course_id from instructor natural join teaches;
Select name, course_id from instructor;
Select course_id from instructor join teaches;
Which of the following fields are displayed as output? SELECT * FROM employee WHERE salary>10000 AND dept_id=101;
Salary, dept_id
Employee
Salary
All the field of employee relation
This is Employee table.
Which of the following employee_id will be displayed for the given query?
 
SELECT * FROM employee WHERE employee_id>1009;
1009, 1001, 1018
1009, 1018
1001
1018
Which of the following statements contains an error?
Select * from emp where empid = 10003;
Select empid from emp where empid = 10006;
Select empid from emp;
Select empid where empid = 1009 and lastname = ‘GELLER’;
In the given query which of the keyword has to be inserted?
 
INSERT INTO employee _____ (1002,Joey,2000);
Table
Values
Relation
Field
{"name":"SQL", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Test your knowledge of SQL with our comprehensive quiz designed for aspiring database professionals and enthusiasts! Dive deep into the world of Structured Query Language and see how well you understand its concepts and commands.Features:Challenging questions covering various SQL topics.Multiple choice format for easy answering.Immediate feedback on your performance.","img":"https:/images/course1.png"}
Powered by: Quiz Maker