SQL Exam: Trivia Questions! Quiz

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Emadeid
E
Emadeid
Community Contributor
Quizzes Created: 5 | Total Attempts: 2,550
| Attempts: 622 | Questions: 25
Please wait...
Question 1 / 25
0 %
0/100
Score 0/100
1. SQL < select * from Emp where sal between 1000 and 2000 ;

Explanation

The given SQL query selects all the rows from the "Emp" table where the "sal" column has a value between 1000 and 2000. Since the query is valid and will return a result, the correct answer is "True".

Submit
Please wait...
About This Quiz
SQL Exam: Trivia Questions! Quiz - Quiz


SQL Exam: trivia questions quiz! The structured query language is designed to help a programmer manipulate databases. It helps in retrieval and editing of data from the database... see morewith ease. This computer language is one of the easiest to understand and was first created in the 1970s. By taking this quiz, you will get a chance to test out your knowledge of the language and how to write it. Give it a try! see less

2. SQL < select name ,sal from Emp where name like 'm%';

Explanation

The SQL query selects the "name" and "sal" columns from the "Emp" table where the "name" column starts with the letter "m". Since the query is valid and will return a result, the correct answer is "True".

Submit
3. SQL is Is based on American National Standards Institute ( ANSI ) standard SQL.

Explanation

The given statement is true because SQL, which stands for Structured Query Language, is indeed based on the American National Standards Institute (ANSI) standard SQL. This standard ensures that SQL is consistent and compatible across different database management systems, allowing for portability and interoperability of SQL code.

Submit
4. SQL Is Manipulates data and table definitions in the data base.

Explanation

The statement is true because SQL (Structured Query Language) is a programming language that is used to manipulate and manage data and table definitions in a database. It is specifically designed for managing relational databases and allows users to perform tasks such as inserting, updating, deleting, and retrieving data from tables. SQL is widely used in the field of database management systems and is essential for working with databases effectively.

Submit
5. DDL is SQL commands that allows the creating, alteration, and dropping of an object from the database.

Explanation

The statement is true because DDL (Data Definition Language) is indeed a set of SQL commands that are used to create, modify, and delete database objects such as tables, indexes, and views. These commands include CREATE, ALTER, and DROP, which respectively allow the creation, alteration, and dropping of objects from the database. Therefore, the given statement accurately describes DDL commands and their purpose.

Submit
6. SQL < select * from Emp where sal between 1000 and 2000 ;

Explanation

The given SQL statement selects all the records from the "Emp" table where the "sal" column value is between 1000 and 2000. Since the statement is valid and will retrieve records based on the given condition, the correct answer is "True".

Submit
7. SQL < select name , job from Emp  where sal < = 25000 or job = 'sales' ;

Explanation

The given SQL query selects the name and job columns from the Emp table where the salary is less than or equal to 25000 or the job is 'sales'. Since the query is selecting rows that meet either of these conditions, it will return true.

Submit
8. SQL < select * from Emp where sal between 1000 and 2000 ;

Explanation

The SQL statement "select * from Emp where sal between 1000 and 2000" is used to retrieve all the records from the table "Emp" where the salary is between 1000 and 2000. Since the statement is valid and can be executed without any errors, the correct answer is "True".

Submit
9. SQL < select name , job , sal from emp where job = 'sales' and sal < 1500;

Explanation

The given SQL statement selects the name, job, and salary of employees from the "emp" table where the job is "sales" and the salary is less than 1500. If there are any employees who satisfy both conditions, the statement will return true.

Submit
10. SQL < select name , job from Emp where sal < = 25000 or job = 'sales' ;

Explanation

The given SQL statement selects the columns "name" and "job" from the "Emp" table where the salary is less than or equal to 25000 or the job is "sales". Since the statement is valid and will return a result, the correct answer is True.

Submit
11. SQL < select * from Emp where sal between 1000 and 2000 ;

Explanation

This SQL statement selects all the rows from the "Emp" table where the "sal" column value is between 1000 and 2000. Therefore, the correct answer is "True" because the statement is valid and will return the desired results.

Submit
12. A null is not the same as zero or a blank space.

Explanation

A null refers to the absence of a value, while zero represents a numerical value and a blank space represents an empty character. Therefore, a null is different from both zero and a blank space.

Submit
13. Definition of DML is SQL commands allow the inserting, updating, and deletion of objects from the database.

Explanation

The given statement is true. DML (Data Manipulation Language) in SQL allows the insertion of new data into the database, updating existing data, and deleting unwanted data from the database. It includes commands such as INSERT, UPDATE, and DELETE, which are used to perform these operations on the database objects. Therefore, the statement accurately defines the purpose of DML in SQL.

Submit
14. SQL < select name , job , sal from emp where (job='sales' or job = 'clerk') and sal < 1700 ;

Explanation

The given SQL query selects the name, job, and salary of employees from the "emp" table where their job is either "sales" or "clerk" and their salary is less than 1700. Since the query is selecting specific columns and applying conditions on the job and salary, it is expected to return a result. Therefore, the correct answer is "True".

Submit
15. SQL < select min sal , max (sal) from emp;

Explanation

The given SQL statement selects the minimum salary and the maximum salary from the "emp" table. Therefore, the correct answer is False, as the statement is syntactically incorrect. The "max" function should be used without parentheses, like "max(sal)", instead of "max (sal)".

Submit
16. SQL < select * from Emp where sal  1000 and 2000 ;

Explanation

The given SQL statement is not written correctly. The correct syntax for selecting records based on a range of values in the "sal" column would be "SELECT * FROM Emp WHERE sal BETWEEN 1000 AND 2000;". Therefore, the correct answer is False.

Submit
17. SQL < select name , sal from Emp name like '-a%' ;

Explanation

The given SQL statement is incorrect. The correct syntax for selecting columns "name" and "sal" from the table "Emp" where the name starts with "-a" would be: "SELECT name, sal FROM Emp WHERE name LIKE '-a%'. Therefore, the correct answer is False.

Submit
18. SQL < select name ,sal from Emp where name like m%;

Explanation

The given SQL statement selects the columns "name" and "sal" from the table "Emp" where the name starts with the letter "m". The correct answer is False because the SQL statement is incorrect. The "%" wildcard character should be enclosed in single quotes ('%') to indicate a pattern match. So, the correct SQL statement should be "SELECT name, sal FROM Emp WHERE name LIKE 'm%';".

Submit
19. SQL < select name , job from Emp where sal < = 25000 or job = sales ;

Explanation

The given SQL statement selects the name and job columns from the Emp table where either the sal column is less than or equal to 25000 or the job column is equal to "sales". Therefore, the correct answer is False because the statement is selecting records that meet either one of the conditions, not both.

Submit
20. SQL < select name , sal + 300 from emp

Explanation

The given SQL statement selects the "name" column and adds 300 to the "sal" column from the "emp" table. Therefore, the correct answer is False.

Submit
21. SQL < select  * where sal between 1000 and 2000 ;

Explanation

The given SQL statement is incorrect because it is missing the "FROM" clause. The correct syntax should be "SELECT * FROM table_name WHERE sal BETWEEN 1000 AND 2000;". Therefore, the correct answer is False.

Submit
22. SQL < select name , job from Emp where sal < = 25000 or job =sales ;

Explanation

The given SQL query selects the name and job columns from the Emp table where the salary is less than or equal to 25000 or the job is equal to "sales". Since the query has an "or" condition, it will return all the rows that satisfy either of the conditions. Therefore, the answer is false, indicating that the statement is incorrect.

Submit
23. Definition of Dcl is SQL commands allow certain DML commands to be undone.

Explanation

The given statement is false. Dcl (Data Control Language) in SQL is used to control access to the database and perform administrative tasks. It includes commands like GRANT, REVOKE, and DENY, which are used to grant or revoke privileges on database objects. DML (Data Manipulation Language) commands like INSERT, UPDATE, and DELETE are used to modify data in the database and cannot be undone using Dcl commands. Therefore, the statement that Dcl commands allow certain DML commands to be undone is incorrect.

Submit
24. SQL Can be abbreviated.

Explanation

SQL cannot be abbreviated. It stands for Structured Query Language and is a programming language used for managing relational databases. Abbreviating SQL would result in a different term altogether and would not accurately represent the purpose and functionality of the language. Therefore, the correct answer is False.

Submit
25. SQL < select * from Emp where sal between 1000 and 2000.

Explanation

The given SQL statement selects all the records from the "Emp" table where the "sal" column value is between 1000 and 2000. Since the statement does not specify any particular condition or constraint, it will return all the records that meet this criteria. Therefore, the correct answer is False, as the statement is not selecting a specific record or condition.

Submit
View My Results

Quiz Review Timeline (Updated): Mar 20, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 20, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Dec 02, 2011
    Quiz Created by
    Emadeid
Cancel
  • All
    All (25)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
SQL < select * from Emp where sal between 1000 and 2000 ;
SQL < select name ,sal from Emp where name like 'm%';
SQL is Is based on American National Standards Institute ( ANSI )...
SQL Is Manipulates data and table definitions in the data base.
DDL is SQL commands that allows the creating, alteration, and dropping...
SQL < select * from Emp where sal between 1000 and 2000 ;
SQL < select name , job from Emp  where sal < = 25000 or...
SQL < select * from Emp where sal between 1000 and 2000 ;
SQL < select name , job , sal from emp where job = 'sales'...
SQL < select name , job from Emp where sal < = 25000 or job =...
SQL < select * from Emp where sal between 1000 and 2000 ;
A null is not the same as zero or a blank space.
Definition of DML is SQL commands allow the inserting, updating, and...
SQL < select name , job , sal from emp where (job='sales'...
SQL < select min sal , max (sal) from emp;
SQL < select * from Emp where sal  1000 and 2000 ;
SQL < select name , sal from Emp name like '-a%' ;
SQL < select name ,sal from Emp where name like m%;
SQL < select name , job from Emp where sal < = 25000 or job =...
SQL < select name , sal + 300 from emp
SQL < select  * where sal between 1000 and 2000 ;
SQL < select name , job from Emp where sal < = 25000 or job...
Definition of Dcl is SQL commands allow certain DML commands to be...
SQL Can be abbreviated.
SQL < select * from Emp where sal between 1000 and 2000.
Alert!

Advertisement